--- In flexcoders@yahoogroups.com, "cjsteury2" <cra...@...> wrote:
>
> Hey Pete, 
> 
> I see you had the same issue I am experiencing today.. and its been 1/2 a day 
> so far of pulling out hair.
> 
> Do you remember how you solved this 3 years ago???

What you have is a race condition where the reset() function in Carousel.as 
assumes that you always have a valid Carousel, but of course the gallery 
property is beling set by a BindSetter that doesn't have anything to bind to 
until the PhotoService resultHandler has populated the photoService's galleries 
property.

If you want to actually fix it, one way is to go into the PhotoService code and 
initialize the galleries variable to new ArrayCollection([new 
ArrayCollection)]);

Not the cleanest solution, but that's kind of what you get when the code is too 
dependent on binding.  The Carousel component unfortunately doesn't _know_ it's 
dependent on binding, so it isn't able to swallow up errors related to being 
passed in junk values via binding.

If you want to just work around it, then you can just listen for 
COLLECTION_CHANGE on photoService.galleries, and switch the ViewStack pane once 
the result is received.

HTH;

Amy

Reply via email to