Ed Leafe wrote:
> On Jun 19, 2009, at 11:11 AM, Paul McNett wrote:
>
>> When restoring a value on a listbox, ignore "string not present in
>> the choices".
>
> I don't have the time to test it now, but just want to understand
> what this will do. If the saved value isn't present in the list, the
> control will open up with no value?
The except clause in that try block fills the value with self.getBlankValue(),
which
by default for listboxes doesn't do anything, I don't think.
My app code assigns a default value to the listbox, like:
lst = dabo.ui.dDropdownList(self, SaveRestoreValue=True,
Choices=["bar", "foo"], Value="foo")
...so if this is the first time running, *or* if the saved value isn't present
in the
choices, the Value will still be on something sensible.
But it wasn't getting that far, because it was raising "string is not present
in the
choices" before getting a chance to set the value explicitly.
Paul
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]