Tcl vs. Python or Re: Question: event.widget, event.type
Jonadab the Unsightly One
jonadab at bright.net
Mon Sep 4 21:55:51 EDT 2000
Chuck Meyers <chuck.meyers at lmco.com> wrote:
> I want to add a context sensative HELP to my GUIs. One way to do
> this is to generate a binding to all widgets that calls a HELP procedure
> passing the calling widget name. In Tcl you have the %W variable to pass
> as a parameter, thus you only need to add a few lines of code and all
> widgets have HELP. You need to maintain the procedure that gets called,
> but when making widgets you can ignore the fact that HELP exists.
Philosophically, if HELP is to be truly context-sensitive, it
makes more sense IMO for each individual widget to provide its
own HELP method (or object; exactly how you implement this is
not as important as the notion of making it item-specific).
This will mean a lot more information in the help feature than
most users are accustomed to being able to get, but that's a
Good Thing(TM).
> Another Tcl advantage is the naming convention. The %W name tells you the
> parents name, so if help is not available for the widget, you could search
> for help for the parent widget.
That does make sense, to some degree at least.
- jonadab
More information about the Python-list
mailing list