it's got a lot of mess and debug junk, but:
public function addedToStageHandler():void
{
Application.application.log.text += "&&&&Got Add
event\n";
Application.application.log.text += "MONTH = " +
monthCB.selectedIndex + "\n";
Application.application.log.text += "DAY = " +
dayCB.selectedIndex
+ "\n";
Application.application.log.text += "YEAR = " +
yearCB.selectedIndex + "\n";
if (date != null)
{
dispatchEvent(new Event(Event.CHANGE, true));
dispatchEvent(new Event(Event.RENDER, true));
Application.application.log.text += "&&&&&date
is NOT null\n";
monthCB.dispatchEvent(new Event(Event.CHANGE,
true));
dayCB.dispatchEvent(new Event(Event.CHANGE,
true));
dayCB.dispatchEvent(new Event(Event.RENDER,
true));
yearCB.dispatchEvent(new
Event(Event.CHANGE,true));
Application.application.log.text += "3 MONTH = " +
monthCB.selectedIndex + "\n";
Application.application.log.text += "3 DAY = " +
dayCB.selectedIndex + "\n";
Application.application.log.text += "3 YEAR = " +
yearCB.selectedIndex + "\n";
}
else
{
Application.application.log.text += "&&&&&&Date
IS null\n";
}
}
So every time it's added to the stage, I'm seeing what the values are,
and the values remain constant and correct, just the option that the
comboboxes are showing are incorrect.
G
--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> How are you verifying that selectedIndex is correct? I assume the
> dropdowns still contain the correct arrays?
>
>
>
> ________________________________
>
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of hardaur55
> Sent: Monday, July 07, 2008 6:47 AM
> To: [email protected]
> Subject: [flexcoders] ComboBox Problems
>
>
>
> Hey all.
>
> Having a silly problem with 3 comboboxes and can't seem to find
> anything very helpful via google.
>
> I'm creating a user registration wizard with multiple pages that
> contains a custom component. The custom component is a date selection
> component consisting of 3 combo boxes (month, day, year). They are
> all populated with simple arrays as the dataProvider.
>
> Every thing works perfectly except. . .If you select your date (DOB in
> this case) and go back to a previous page in the wizard when you
> return to the page with the DOB control, the comboboxes are showing
> the prompt again. The selectedIndex/Item !IS! correct, it's just not
> displaying the that correct value. They're not being reinstantiated,
> etc.
>
> I've tried firing off CHANGE and RENDER events on the comboboxes but
> nothing (programatically) will force them to show the value they have
> for selectedIndex that I've been able to find.
>
> Anybody have any pointers on this one? Seems silly to me that the
> default behavior wouldn't be to always show the current selectedIndex
> *shrug*.
>
> Thanks!
>
> Gerald
>