Ed, 
Thanks for the tip!

It seems that the setAll statement below is changing the Dynamic for the
panel itself and not the children textboxes...

def myPanel(dabo.ui.dPanel)

        def afterInitAll(self):
        
self.setAll("DynamicForeColor",self.fieldForeColor,filt="BaseClass ==
dabo.ui.dTextBox")
        
self.setAll("DynamicBackColor",self.fieldBackColor,filt="BaseClass ==
dabo.ui.dTextBox") 

UPDATE RAConvTextBox {'ForeColor': <bound method RAKiloPanel.fieldForeColor
of <RAKiloPanel (baseclass dabo.ui.dPanel, id:-430)>>, 'BackColor': <bound
method RAKiloPanel.fieldBackColor of <RAKiloPanel (baseclass dabo.ui.dPanel,
id:-430)>>}

What did I do wrong?

Thanks,
Larry


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Ed Leafe
Sent: Thursday, August 09, 2007 11:58 AM
To: Dabo Users list
Subject: Re: [dabo-users] DynamicBackColor issue

On Aug 9, 2007, at 2:43 AM, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
wrote:

> I subclassed dTextBox and set the DynamicBackColor and it works fine.
>
> When I use the subclassed dTextBox in another object and "reassign"  
> the
> DynamicBackColor via a "setAll" statement from its parent panel, the 
> new color is being overridden by the original DynamicBackColor from 
> the mytext class.
>
> I have verified that the DynamicBackColor function (setBackColor2) in 
> "mypanel" is in fact firing, but then is goes on and fires 
> DynamicBackColor function (setBackColor) in "mytext"  immediately 
> after.
>
> Any thoughts?

        No, not really. I just tried with a similar case, and only got the
one method firing.

        Try this: modify your dPemMixin.py file so that the update() method
(around line 1139) looks like:

1139 def update(self):
1140    """Update the properties of this object and all contained  
objects."""
1141    if isinstance(self, dabo.ui.deadObject):
1142            # This can happen if an object is released when there is a
1143            # pending callAfter() refresh.
1144            return
1145
1146    print "UPDATE", self.Name, self._dynamic
1147    self.__updateDynamicProps()
1148
1149            if isinstance(self, dabo.ui.dForm) and
self.AutoUpdateStatusText:
1150                    self.setStatusText(self.getCurrentRecordText())
1151
1152            if self.Children:
1153                    self.raiseEvent(dEvents.Update)

        Afterwards, run your code an you should get a bunch of statements
printing out. What I'm thinking is that perhaps the internal attribute
self._dynamic, which holds the dictionary of dynamic properties, is not
getting updated properly. Post the output so that I can better see what is
going on.

-- 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]

Reply via email to