This content has been marked as final. Show 3 replies
"Greg Lafrance" <firstname.lastname@example.org> wrote in message
>I have an AIR app that has a menu item that when selected launches a
> I need to set the enabled property of the menu item to false after it is
> selected, as only one instance of this dialog should be launched, and I
> want to make the dialog modal. I also need to set the enabled property to
> when the dialog is closed.
> Do I do this through the defaultDataDescriptor?
> BTW, the dialog that launches is not a popup, it is in an AIR app in the
> window, in what I call the "workarea".
What is the code of your menu? MenuItems have an enabled property, but
knowing you I'm guessing the problem is not that you don't know that.
I found out how to disable it in the itemClick listener, now I just have to figure out how to re-enable when the user closes the dialog, but no doubt I will do it by manipulating the XMLListCollection dataProvider.
I don't know if this is how I should do it, but I create an associative array Object and when I disable a menu item in the ItemClick event (if it is a menu item that should be disabled at that time), I store a reference to the menu item in the Object. Then when I close the dialog I use the reference to re-enable the menu item.