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




_______________________________________________
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