[ltk-user] *wish* global
Shawn Betts
sabetts at gmail.com
Sat Jun 16 00:30:00 UTC 2007
Hi ltkers,
Maybe I'm just not using it quite right, but I'm having trouble
cleanly dealing with the *wish* global which, if i understand
correctly, is let'd in several places to ensure that functions use the
correct wish object.
I'm using ltk along with some networking code and so I ltk's
:server-event set to nil. The problem is I then have to bind *wish*
properly whenever I update the gui from the network code. It's sort of
clunky and frustrating.
My suggestion: have some or all tk widgets contain a wish slot that
stores the connection to wish. That way objects just do the right
thing when you use them. For commands that don't require a widget,
such as wish-exit, you explicitely pass an ltk-connection object that
was given to you when you opened the connection.
This seems closer to how clx works.
-Shawn
More information about the ltk-user
mailing list