[Pythonmac-SIG] Re: mac event loop

Jack Jansen Jack.Jansen@cwi.nl
Fri, 23 Oct 1998 11:40:28 +0200


> Great, that's what I need :). Let me know the input/return parameter please.
> 
> I wonder how I can get that info by myself. Up to now I haven't downloaded
> the source code because I have a somewhat outdated compiler (CW 8).The Win 
> module of the std destribution is delivered as shared lib and the IDE does 
> not list Get/SetWindowUserState(). Do I miss anything ? Probably I have to 
> download the source ...

That's not necessary. For all the automatically generated modules the 
docstrings of the various methods show their calling convention. Together with 
Inside Mac or some oter source of information on what the call does this 
should give you enough information.

The only problem is getting at the docstring: to get it for 
GetWindowUserState, for instance, you'll first have to create a Window object. 
I don't know of any way around this (does anyone else?).

> The advantage of using mac calls directly is documentation and may be (?)
> more
> flexibility. But the python implementation is different anyway and probably
> most folks use FrameWork.py. FrameWork.py seems (to me!) to be too much
> highlevel 
> and lowlevel at the same time. 

FrameWork basically "happened", in stead of having been designed. Guido 
started it years ago, and since then I've been adding stuff as I needed it, 
and so did Just and a few other people. Still, I find that it's low-level 
enough and adaptable enough that I hardly ever write an event loop from 
scratch anymore. I'm still pretty angry with myself for starting from scratch 
once (for cmifed/grins, my main project), because in the long run it would 
have saved lots and lots of work if I had adapted FrameWork in stead.

What would be nice if we had an alternative high-level framework, for instance 
by exporting metrowerks PowerPlant framework to Python. This is basically what 
Mark Hammond has done for MFC on Windows, and the result is that PythonWin 
programs often look pretty slick.
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@cwi.nl      | ++++ if you agree copy these lines to your sig ++++
http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm