comp.lang.tcl
[Top] [All Lists]

Re: NexTk 0.5 Release

Subject: Re: NexTk 0.5 Release
From: George Peter Staplin
Date: Fri, 30 May 2008 15:18:07 +0000 UTC
Newsgroups: comp.lang.tcl

Gerald W. Lester wrote:
> George Peter Staplin wrote:
> > As of Thursday May 29, 2008  NexTk 0.5 has been *released!*
> >
> > ...  A unique prototype-based
> > object-oriented system was developed called objstructure for NexTk.
> > Objstructure provides a wealth of features with a simple API...
>
> Now that TIP 257 (TclOO) has passed and since there is a reference 
> implementation out there for it, any chance you can use it for the base of 
> your objstructure?

I talked with DKF about this briefly.  I'm sort of waiting to see how 
TclOO works out, especially for Arnulf's itcl-ng, and ntkWidget (based 
on NexTk) for itcl-ng.

I'm not sure that Tcl needs TclOO, but Tcl has needed for some time 
better data structure support.

It's bizarre to me how some Tcl programmers can build such complex 
systems with the data structure primitives that Tcl 8.5 has thus far 
provided.

Then I see enormous amounts of effort put into things like ensembles 
which cost a lot in terms of code, memory, and time, just for some 
whitespace.  Apparently some programmers have an aversion to the - or _ 
characters.  Tcl will never be a natural language as I see it.  Some 
things just don't make sense to me.

> Also, does it mix and match with tk and ttk widgets?

Not by default, but if someone wants to maintain the compat layer, you 
should be able to embed NexTk widgets in Tk.  That's how I got started 
building this.  Now it doesn't require Tk at all.

> Lastly, what is the performance like compared to regular tk/ttk widgets?

It's usably fast.  In some ways Tk may be faster, because it sort of 
cheats in comparison to NexTk.  Tk uses a lot of idle redrawing, and 
idle geometry management, which creates flicker.  Tk also doesn't use 
the DBE extension with X11, like NexTk's csrc/ntk/x/x_ntk.c does with 
XdbeSwapBuffers, so with large copies to the display with XCopyArea 
there is flicker with Tk.

In terms of image display, NexTk is much much faster.  NexTk began after 
some experiments with the megaimage extension.  I originally was going 
to refactor and cleanup the Tk photo layer, so that it supported XShm (a 
shared memory transport for images), but I came to realize that some of 
the problems with it were by design.  I also wanted the ability to 
manipulate images in Tcl, without Tk.  Megaimage only requires Tcl, and 
it has no knowledge of graphic display.  There are backends like ntk 
which provides a ntk-put-image command to display a megaimage in an ntk 
window.


George

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy