From: Kevin A. <al...@se...> - 2001-09-07 01:48:23
|
I haven't done extensive testing, but cvs seems to be okay for the more adventurous people on the list. You will need the latest PyCrust from cvs as well. The change earlier today added some infrastructure to support background events. In particular, 'openBackground' which happens after all other Background initialization and replaces the following two lines in many of the samples: def __init__(self, aParent, aId, aStackRsrc, aBgRsrc): PythonCardPrototype.model.Background.__init__(self, aParent, aId, aStackRsrc, aBgRsrc) with: def on_openBackground(self, source, event): I'm using openBackground more like the openStack system message in HyperCard right now, so when we have multiple backgrounds, the usage will change slightly, since you would only want to init your background once. You'll also notice that there isn't a name in the method above, which is now true for any background handler such as the one in tictactoe.py def on_bg1_mouseClick(self, button, event): which is now just: def on_mouseClick(self, button, event): It isn't necessary to provide the name of the background anymore, because the context is already known. If you do checkout from cvs, please let me know if you find any problems. I will be adding additional messages for window resize, window move, idle, etc. tomorrow if all goes well. And in case you're wondering, this is sort of tied into my experiments with scrolling windows and sizers. Scrolling windows looks relatively straightforward, so I may add that in the next day or two. Debug menu/Shell feature I added a "Redirect stdout to shell" option to the Debug menu, so you can have any print statements in your code, go to the shell instead of the console. The menu item acts as a toggle, so you can turn it on/off whenever you like. ka |