[Pythonmac-SIG] Re: mac event loop
Jack Jansen
Jack.Jansen@cwi.nl
Thu, 22 Oct 1998 16:27:31 +0200
> Yes, I've implemented the std behavior but it doesn't fullfill my
> requirements. Anyway, another way might be to reset termporarily the size of
> the grey region. Win.py supports GetGreyRegion(). Is there a way to set the
> grey region ? Hmm ..., I think presently the most easy way will be to use
> Size/MoveWindow() :)
Hmm. Would it be good enough if I allowed you access to the dataHandle item as
a handle? This is fairly easy to implement, and you could fill the handle
yourself with the struct module (through it's data attribute).
> A global GetMenuID() function could serve all involved menu handler. May be
> it should start with 256 to avoid conflicts with resource ID's. It's best
> location would be (Mac) Menu.py. If you put it into FramWork.py everybody
> has to load this module. This should better be avoided IMO.
Except that Menu.py is automatically generated, and I'd like to keep it that
way.
Actually, maybe we should add a module whose only job is to coordinate the
various packages that use windows, events, menus, etc. This could contain the
menuid stuff, the event loop stuff and possibly more.
What do you all think?
> Sorry, there is a missunderstanding. My english isn't the best. What I would
> like to know is whether other eventloops *expect* me to handle async events.
> For instance: I later have to use Sockets (or mac TCP/IP, PPP) as well as
> AppleEvents. Is there any *need* to handle async events for this modules.
> Probably your answer is "It depends ..." :))
I tend to think of the current mainloop as the important one, and the other
mainloops get a little support (redraws, mainly), but that is all. I wouldn't
worry too much about your mainloop having to handle async events for, say, the
Tk mainloop. This doesn't really sound like decent programming practice. And,
of course, if it'll ever happen we could always add hooks in the coordinatiojn
module mentioned above...
--
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