Yes I do. However, they all have a call to self.super()
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Ed Leafe
Sent: Wednesday, October 10, 2007 7:29 AM
To: Dabo Users list
Subject: Re: [dabo-users] Passing a function via the setAll
On Oct 10, 2007, at 12:57 AM, <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]> wrote:
> self.transqtyID is at
> dForm->dScrollPanel->dPanel->dPageFrame->dPanel->dPanel
> I just went thru the following from the CTRL+D box...
> self.transqtyID.update()
> self.transqtyID.RAConvpgf.update()
> self.transqtyID.RAConvpgf.RAKiloPanel.update()
> self.transqtyID.RAConvpgf.RAKiloPanel.Children[0].update()
>
> And it did not reset my readonly prop until the last one.
Do you have an 'update()' method defined anywhere? Perhaps that is
interfering with the propagation of events?
I created a simple test program to mimic your layout:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - import
dabo
dabo.ui.loadUI("wx")
class UpdForm(dabo.ui.dForm):
def afterInit(self):
p1 = dabo.ui.dScrollPanel(self, BackColor="red")
self.Sizer.append1x(p1)
p1.Sizer = dabo.ui.dSizer()
p2 = dabo.ui.dPanel(p1, BackColor="green")
p1.Sizer.append1x(p2)
p2.Sizer = dabo.ui.dSizer()
p3 = dabo.ui.dPanel(p2, BackColor="blue")
p2.Sizer.append1x(p3)
p3.Sizer = dabo.ui.dSizer()
p4 = dabo.ui.dPanel(p3, BackColor="brown")
p3.Sizer.append1x(p4)
p4.Sizer = dabo.ui.dSizer()
p5 = dabo.ui.dPanel(p4, BackColor="yellow")
p4.Sizer.append1x(p5)
p5.Sizer = dabo.ui.dSizer()
self.chk = dabo.ui.dCheckBox(p5, OnHit=self.onChk)
p5.Sizer.append(self.chk)
t1 = dabo.ui.dTextBox(p5)
t1.DynamicEnabled = self.shouldEnable
p5.Sizer.append(t1)
def onChk(self, evt):
self.update()
def shouldEnable(self):
return self.chk.Value
if __name__ == "__main__":
app = dabo.dApp()
app.MainFormClass = UpdForm
app.start()
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Clicking the check box calls the form's update method, which then
trickles down to the textbox through all the layers, and the textbox
enables/disables as expected.
If this test program works for you, then the problem is somewhere in
your code. To isolate the problem, modify dabo/ui/uiwx/dPemMixin.py:
change its update() method to read:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def update(self):
"""Update the properties of this object and all contained
objects."""
if isinstance(self, dabo.ui.deadObject):
# This can happen if an object is released when
there is a
# pending callAfter() refresh.
return
print "UPD", self
self.__updateDynamicProps()
if isinstance(self, dabo.ui.dForm) and
self.AutoUpdateStatusText:
self.setStatusText(self.getCurrentRecordText())
if self.Children:
print "RAISING", self
self.raiseEvent(dEvents.Update)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]