[Pythonmac-SIG] disabling menus in FrameWork/W?

Joseph J. Strout joe@strout.net
Thu, 4 Mar 1999 13:59:21 -0800


At 1:38 PM -0800 03/04/99, Jack Jansen wrote:

>The real way to do this, IMNSHO, is to add an extra level of
>abstraction. ... map menuitems to abstract thnigs called
>"commands", and each window has a dictionary mapping commands to
>callbacks. There's such a dictionary for the application too (and even
>for other things like window groups and
>currently-active-widget)....
>Moreover, not only menus map to commands, but buttons can
>too (as in toolbars), or appleevents (and you can even address them to
>specific windows or other objects).

Makes sense to me.  That's the way some C++ frameworks I've seen work.  It
works especially well when building the interface with ResEdit; you can
embed command numbers in menu and button labels, or widget names.  Then map
these command numbers to action in the program (and strip them off the
menus/buttons before displaying, of course).

Sounds like a fairly major rewrite, though.  In my book, it's way lower in
priority than, say, being able to test/run Mac apps from the IDE.

Cheers,
-- Joe
,------------------------------------------------------------------.
|    Joseph J. Strout           Biocomputing -- The Salk Institute |
|    joe@strout.net             http://www.strout.net              |
`------------------------------------------------------------------'