[Pythonmac-SIG] Re: [MACTCL] Re: Python/Tkinter and QuickTimeTcl

Steven Majewski sdm7g@Virginia.EDU
Thu, 21 Mar 2002 17:06:55 -0500 (EST)


On Thu, 21 Mar 2002, Jim Ingham wrote:

> BTW - IMO, much of the time C interfaces are not a good match for the
> interfaces you want from a scripting language - the design goals are
> different.  So this sort of autogeneration is mostly useful as a "first
> cut" kind of thing.  For instance, Tk is MUCH more useful than a
> straight wrapped version of Carbon would be.  Not sure whether this is
> so true of AppKit since the API's are already at a pretty high level.
> But I bet Tk would still in the end be more convenient...  Similarly,
> QuickTimeTcl adds a movie object that you create and manipulate, which
> is not the way the C API's are written, but is more convenient from
> Tcl...

>From my experience playing with both Tcl/Tk (and Python/Tkinter)
and Cocoa w/Python+pyobjc, I would say that if you have to do everything
programatically (which is the case right now) then Tk is definitely
easier than Cocoa, but if we can ever get Python+Cocoa  to work with
Interface Builder nibs, then Cocoa would be much more convenient.

Tcl/Tk is very procedure oriented, and the procedures to create and
layout objects are very concise.

Cocoa is very object oriented, and was really designed to work with
I-B's 'frozen objects' -- if you have to actually write procedures
to create all of your objects, then Cocoa becomes more of a pain to
use.


BTW: Jack's code is not as general purpose and flexible as SWIG, but,
 being special purpose, it produces better wrapper code for MacPython.

-- Steve Majewski