On Sep 25, 2006, at 8:19 AM, Simen Haugen wrote:

I first update my control, and then set if it should be enabled or not.

When running update(), self.Enabled is set to self.enabled. Why are
there two variables?

I can just use enabled instead of Enabled here, but that would mean a
different interface for the controls.

Enabled is the Dabo property that should be used. 'enabled' is a local, 'internal-use only' attribute that should probably be named '_enabled' to indicate its purpose. I'm sure that this was written in the early days of Dabo development when we hadn't settled on our naming conventions.

Setting the attribute 'enabled' doesn't do anything in and of itself; it is the action of setting the Dabo property 'Enabled' that actually calls the underlying toolkit's methods to enable/disable the control - in this case, it calls wxPython's self.Enable(bool) function; with other toolkits in the future, it will call the appropriate command.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to