[PYTHONMAC-SIG] ped/framework weirdness
Just van Rossum
Wed, 14 May 1997 12:15:01 +0200
At 11:09 AM 5/14/97, Jack Jansen wrote:
>> I was hoping to use the framework to do some experimenting with a project
>> I've been working on. Finally got sick of trying to do it in C. So I
>> started trying out the framework last week, and ped looked like a good
>> place to start since I want to use TE boxes. The do_activate method in the
>> TEWindow class has a line print "ACTIVATE", onoff right at its
>> beginning. I noticed that if I open two new windows in ped and click back
>> and forth between them, the print statement shows only *deactivate* events
>> in the Python output window: "ACTIVATE 0".
>Hmm, you're right. I'm not sure exactly what's going on, but I suspect that
>it has to do with the debug output: printing causes Sioux to run, and it may
>eat some events in that case. Try removing all print statements.
It took me a while, but that's exactly it. Some events were being eaten by
SIOUX (the Metroworks console that just doesn't stop to suck), which has
it's own event handling stuff, even though it was't supposed to do so:
MacOS.EnableAppswitch(-1) was performed in FrameWork, which means that no
event should be passed to SIOUX. But, (and this I didn't know), it still
eats events during printing...
Solution: omit the print statements and you're fine, although the
scrollbars still behave a bit strange, but I guess that's ped's or
FrameWork.ScrolledWindow's fault (left as an excercise). Besides that, we
can fully blame SIOUX.
>Another possibility is to look at the waste demos, they show the correct
>behaviour. These were adapted from ped, so the code is similar. I don't have
>time right now to check out what I did correctly in those and wrong in ped,
>though, so you're on your own.
Waste rocks. It's excellent. Builtin undo. Some tab support. Very flexible.
This is supposed to sound cheesy, but it's true: Since I discovered WASTE,
I never even looked at TE again...
PYTHONMAC-SIG - SIG on Python for the Apple Macintosh
send messages to: firstname.lastname@example.org
administrivia to: email@example.com