wxpython: problem with events and checklistbox
Jeff Shannon
jeff at ccvcorp.com
Wed Apr 3 14:55:53 EST 2002
In article <3caabb5e.1387250 at news.easynews.net>, stojek at part-
gmbh.de says...
>
> Believe it of not, i changed the design ;-)
> Anyway I think there should be a way to distiguish between events
> triggered by the user (check with mouseclick) and triggered by a
> function (List.Check(i,true)). At least there should be a way to kill
> an event right after it had been raised by a function.
But 95% of the time that you trigger an event like that, it's
because you *want* it to simulate user interaction. If you set a
checkbox, don't you want it to have the same effect as if the
user set the checkbox? If not, then why are you setting it to
begin with?
Admittedly, restoring a serialized object is a special case. The
checkbox event handler should modify the state of the object, but
a serialized object already *has* that modified state, and you're
trying to set the checkbox to be in sync with that. Typically,
though, if you need your handler to respond differently to user
interaction than to programmatic control, it's because your
design is poor.
--
Jeff Shannon
Technician/Programmer
Credit International
More information about the Python-list
mailing list