[Pythonmac-SIG] using "W" with MiniAEFrame

Corran Webster cwebster@nevada.edu
Tue, 29 Feb 2000 19:16:50 -0800


> Are there any caveats to using MiniAEFrame with the "W" module? I need to
> create an application with a face that can also respond to AppleScript
>events.
>
> Or am I just being stupid, and does the W module already include apple event
> support?

W is based on FrameWork, and so it handles Apple Events as part of the main
event loop.  Since the AEServer class in MiniAEFrame is just a
user-friendly wrapper around AE.AEInstallEventHandler, and the latter works
fine, you should be able to use AEServer without too much difficulty - just
subclass your application from both WApplication.Application and
MiniAEFrame.AEServer.

If you're writing applications in W, you might want to check:

http://www.nevada.edu/~cwebster/Python/WWidgets/index.html

which has a tutorial with examples, and a (slightly incomplete, but
reasonable) reference for thw W widgets.  In particular, you should look at:

http://www.nevada.edu/~cwebster/Python/WWidgets/templateapp.html

which is a minimal application which does handle the four required
AppleEvents (even if it is by ignoring everything except Open Document)
using the more rudimentary AE.AEInstallEventHandler.

Regards,
Corran