[Pythonmac-SIG] Weired SelectWindow behaviour
Tue, 1 Dec 1998 17:22:21 +0100
>> [ Peter ]
>>I've got some weired behaviour of my inContent handler. If I click
>>into the content part of a second (deactivated) window everything
>>works ok, the window comes to front. But if I click into the title
>>bar nothing happens. I've made a normal dispatch table wich switches
>>into the different handlers and the handler then calls SelectWindow().
>>Nothing special at all.
>Does it happen consistently?? If not, maybe you're losing events. Check
>MacOS.SetEventHandler() or ancient predecessor MacOS.EnableAppswitch(). I
>still don't know how MacOS.SetEventHandler() works, so I'll only explain
>what MacOS.EnableAppswitch() does. You need to call it with -1 or 0:
> -1 means: Python won't handle events
> 0 means the same, but still check for cmd-.
>This makes sure you don't lose events.
>With the default value 1 you do lose events, thanks to the ever wonderful
>SIOUX window, which will then get update events and will eat some others,
>Hope this is it...
Neither SetEventHandler() nor EnableAppswitch() changes anything (I've placed
it in front of the mainloop, ok ?). I've played a little with schedparams
same result. But this seems to be relevant for async events only anyway (at
in Framework.py it looks like).
The behaviour happens constistently. And its is even more funny. If I click
times somewhere into the windows title bar (deactivated in the background) the
background window is collappsed and expanded again. This although I don't
get a part
code "inCollapseBox" at all. Strange, isn't it :)
BTW: How about removing the traceback window of your IDE if running
__main__ again ?