Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm using a DropDownCommandInput to simulate a "File:" menu with items for New, Close, Open, Save, Save As etc When "Open" is selected the NotifyInputChanged function shows that the "value" of the DropDownCommandInput has changed to "Open" and this is processed fine.
However it is confusing to always see the previously-used command, such as "Open" showing. I made a dummy list item "File:" as the first element and after processing "Open" I do this:
self.fileDropDown.listItems.item(0).isSelected = True
Awesome. I always see "File:" at the top and it sort of looks like a menu.
I have two issues or possible bugs.
1. I never get a NotifyInputChanged on the first element 0 named "File:" Worrysome.
2. I get two NotifyInputChanged calls. First when selected and again when I set "0" to isSelected = True
I have two issues or possible bugs.
1. I never get a NotifyInputChanged on the first element 0 named "File:" Worrysome.
2. I get two NotifyInputChanged calls. First when selected and again when I set "0" to isSelected = True
Two calls to Open are very bad. When I remove the code that selects element "0" then both those bugs go away but it no longer looks like a menu.
Is there a way to change the selection of a drop down list inside the change notification code path that doesn't cause losing one event and getting a double of another? This feels like a threading issue as I'm doing an action that will cause one item to de-select (and fire an un-wanted change event) and the other event (0 is selelected) to be eaten by a grue.
Is there a way to change the selection of a drop down list inside the change notification code path that doesn't cause losing one event and getting a double of another? This feels like a threading issue as I'm doing an action that will cause one item to de-select (and fire an un-wanted change event) and the other event (0 is selelected) to be eaten by a grue.
Solved! Go to Solution.