Yes, but enabled is set to True in __init__, and not set when setting
Enabled. When calling update, Enabled is set to enabled (True),
overwriting my call as Enabled = False right before update().
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Ed Leafe
Sent: 25. september 2006 14:34
To: Dabo Users list
Subject: Re: [dabo-users] Bug in dDataControlMixinBase.py

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



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

Reply via email to