On Feb 10, 2010, at 2:58 PM, John wrote:
> class ContactDropDown(dabo.ui.dDropdownList):
> def update(self):
> self.Clear()
> self.Choices,self.Keys = self.Form.contactChoices()
> self.super()
Why is the call to the wx-level Clear() needed? What behavior were you
seeing that made you add that?
Setting Choices to a list will automatically clear any existing values.
Same with Keys.
> First is this the best way to handle the situation where I need to populate
> dynamic dropdowns? Second I wonder if something should be added to Framework
> to handle situations like I have described. I'm not sure how. But I believe
> it happens often to many.
The best way is what works for your app. And no, this isn't a
framework-level design; it seems to be a quirk with the way that you design
your apps. If I had data that varied with every single call to update(), I sure
wouldn't be using a dropdown list.
-- Ed Leafe
_______________________________________________
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/[email protected]