You can use the call back mechanism to load the data into model. And
call that method in the creationComplete of that progress bar or any
other kind.

Call Back mechanism works like it will wait to process the next line
of code. Because of asynchronous nature of flex we are running like
this kind problems. 



--- In flexcoders@yahoogroups.com, "Jim Hayes" <j...@...> wrote:
>
> >But before i show my form I need the model variable to be populated. 
> >How do you handle this type of situation.
> 
> Could you use ChangeWatcher to watch that variable and show the form
when it changes?
> 
> ChangeWatcher.watch(yourModel,"yourModelVariable",showYourForm);
> 
> I'm sure there are other ways , it probably depends on your
situation which would be best, however.
> 
> 
> -----Original Message-----
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of jerry_gagliano
> Sent: 02 February 2009 21:18
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: model locator population too late
> 
> How the hell do you bound a progress bar to a model? 
> 
> I have the same problem. Which I execute a cairngrom event and it 
> populates the the model variable. But before i show my form I need the 
> model variable to be populated. How do you handle this type of 
> situation. 
> 
> Thanks
> 
> --- In flexcoders@yahoogroups.com, "Paul Andrews" <paul@> wrote:
> >
> > Surely the progress bar is bound to the model, not part of the model 
> itself?
> > 
> > ----- Original Message ----- 
> > From: "dnk" <d.k.emaillists@>
> > To: "Flexcoder List" <flexcoders@yahoogroups.com>
> > Sent: Friday, January 16, 2009 11:14 PM
> > Subject: [flexcoders] model locator population too late
> > 
> > 
> > > Hi there,
> > >
> > > I have an app that uses a model locator class.
> > >
> > > Now I have a component that is passed in a reference to another
> > > component (A progress bar in my case).
> > >
> > > Now my problem is that the component is being created prior to the
> > > model locator being populated with the reference to the progress 
> bar.
> > >
> > > So then obviously my component does not work as expected as it 
> needs
> > > that reference.
> > >
> > > I have no idea on how to get around this issue. I can't populate 
> the
> > > model locator (manually) any earlier as the progress bar has not 
> yet
> > > been created.
> > >
> > > Ideas?
> > >
> > > d
> > >
> > >
> > >
> > > ------------------------------------
> > >
> > > --
> > > Flexcoders Mailing List
> > > FAQ: 
> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > > Alternative FAQ location: 
> > > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-
> 446f-b4cf-1e62079f6847
> > > Search Archives: 
> > > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 
> Groups 
> > > Links
> > >
> > >
> > >
> >
>  
> 
> ______________________________________________________________________
> This communication is from Primal Pictures Ltd., a company
registered in England and Wales with registration No. 02622298 and
registered office: 4th Floor, Tennyson House, 159-165 Great Portland
Street, London, W1W 5PA, UK. VAT registration No. 648874577.
> 
> This e-mail is confidential and may be privileged. It may be read,
copied and used only by the intended recipient. If you have received
it in error, please contact the sender immediately by return e-mail or
by telephoning +44(0)20 7637 1010. Please then delete the e-mail and
do not disclose its contents to any person.
> This email has been scanned for Primal Pictures by the MessageLabs
Email Security System.
> ______________________________________________________________________
>


Reply via email to