On Jan 1, 2013, at 6:03 PM, Carey Gagnon <[email protected]> wrote:

> I have an issue with the DynamicVisible property on a dButton
> If I set it to return False when there is no biz count and True if there is
> a biz count the button never become visible on update. If I do the
> opposite, it works, the button is initially visible and then not visible on
> update when there is a biz row count.

        OK, I've tracked it down. I'm surprised that no one caught this before!

        Here is the code in dPemMixin that handles update events:

1338     def __onUpdate(self, evt):
1339         """Update any dynamic properties, and then call the update() 
hook."""
1340         if isinstance(self, dabo.ui.deadObject) or not self._constructed():
1341             return
1342         # Check paged controls event propagation to inactive pages.
1343         try:
1344             updateInactive = self.Parent.UpdateInactivePages
1345         except AttributeError:
1346             updateInactive = None
1347         if updateInactive == False and self.Parent.SelectedPage != self:
1348             return
1349         if not updateInactive and not self.Visible:
1350             # (some platforms have inactive pages not visible)
1351             return
1352         self.update()

        Note that in line 1349, if the control is not Visible, it never calls 
the update() method. I'm sure that the thinking was that if the control isn't 
visible, why waste time updating it?

        I'll look into finding a good solution tonight.



-- Ed Leafe





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to