A while back I came across Jester's link that Tracy mentioned. The sample is for Flex 1.5, but the logic behind it is probably still applicable.
http://www.jessewarden.com/archives/2005/05/flex_flash_refr.html
You may not want to start any processing until after the creationComplete event of your popup, maybe even a certain amount of time beyond that.
--- In [email protected], "Doug Arthur" <[EMAIL PROTECTED]> wrote:
>
> Yea, I'm going to need some help. I ended up using:
>
> Application.application.callLater(parseOrders, args);
>
> parseOrders is a new function where I basically broke out the loop into a
> seperate call to the above listed code. This still did not display my popup
> before the loop properly. Maybe i'm not doing it right?
>
> for each(var vendorOrder:VendorOrder in vendorOrders)* *{
> var args:Array = new Array();
> args.push(vendorOrder);
> Application.application.callLater(parseOrders, args);
> }
>
> private function parseOrders(vendorOrder:VenorOrder):void {
> *// do what was in my loop originally instead of callLater()...*
> }
>
> On 8/2/06, Doug Arthur [EMAIL PROTECTED] wrote:
> >
> > I looked in the docs, and it's suppose to be: callLater(myFunction, args)
> >
> > When I try this, I get Error - 1180: Call to a possibly undefined method
> > callLater.
> >
> > Thanks!
> >
> >
> > On 8/1/06, Tracy Spratt [EMAIL PROTECTED] wrote:
> >
> > > Use callLater() to start the loop. That will give the ui a chance to
> > > update before the heavy processing begins. If you have heavy processing
> > > going on, like in a loop, the UI will not redraw until the loop is done. To
> > > change this you need to break the loop up into smaller bits and use
> > > callLater() to get the ui to update.
> > >
> > >
> > >
> > > Jesse helped me with this a year or so ago. I couldn't find his example
> > > any more. If you need more help I will try.
> > >
> > >
> > >
> > > Tracy
> > >
> > >
> > > ------------------------------
> > >
> > > *From:* [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com]
> > > *On Behalf Of *Doug Arthur
> > >
> > > *Sent:* Tuesday, August 01, 2006 7:22 PM
> > > *To:* [email protected]
> > >
> > >
> > > *Subject:* Re: [flexcoders] PopUp from within a class
> > >
> > >
> > >
> > > That's perfect, thanks.
> > >
> > >
> > >
> > > One other issue I have is when popuping up the window before a large
> > > loop, the window doesn't actually render until the loop is done. Is there a
> > > reason for that or a workaround? I'm working on the same thing as in another
> > > thread about a 'Please Wait...' type of thing, but I want to put a progress
> > > bar and do setProgress(n, x); where n is the incrimented number in the loop
> > > and x is the total loop count.
> > >
> > >
> > >
> > > Thanks!
> > >
> > >
> > >
> > > On 8/1/06, *Martina Smith* < [EMAIL PROTECTED] wrote:
> > >
> > > Hi Doug,
> > >
> > >
> > >
> > > Try using the code in the zip attached herewith..
> > >
> > >
> > >
> > > I have given a complete example of how PopupManager will work.
> > >
> > >
> > >
> > > Hope this solves your problem!
> > >
> > >
> > >
> > > Regards,
> > >
> > > Martina
> > >
> > >
> > >
> > >
> > >
> > > *Doug Arthur < [EMAIL PROTECTED] wrote:
> > >
> > > Yes, I've dealt with PopUp's plenty of times, but the problem is while
> > > I'm within a class object, it will not let me reference the document. I've
> > > tried using "this", and it does not work. this.parent is null. The only
> > > thing I've found to work now is the following:
> > >
> > >
> > >
> > > *var* tw:TitleWindow = *new* TitleWindow();
> > > tw.title = *'Test Window...' *;
> > > *var* txt:Label = *new* Label();
> > > txt.text = *'THIS IS A TEST'*;
> > > tw.addChild(txt);
> > > PopUpManager.addPopUp(tw, Application.application *as* DisplayObject, *
> > > true*);
> > >
> > >
> > >
> > >
> > > I'm not sure if there is any other way though...?
> > >
> > >
> > >
> > > Thanks!
> > >
> > >
> > >
> > >
> > > On 7/31/06, *Martina Smith* < [EMAIL PROTECTED] > wrote:
> > >
> > > Hi Doug,
> > >
> > >
> > >
> > > You can make use of PopupManager Class to create a popup dynamically.
> > >
> > >
> > >
> > > Regards,
> > >
> > > Martina
> > >
> > >
> > >
> > > *Doug Arthur < [EMAIL PROTECTED] wrote:
> > >
> > > Does anyone know how to create a popup from within a class? I can't
> > > seem to reference anything of type DisplayObject such as .parent and so
> > > on... I've even tried instantiating SystemManager.getSWFRoot(this), and
> > > other things with SystemManager... Nothing is working.
> > >
> > >
> > >
> > > Any ideas? Thanks!
> > >
> > >
> > > ------------------------------
> > >
> > > Here's a new way to find what you're looking for - Yahoo! Answers<http://us.rd.yahoo.com/mail/in/yanswers/*http:/in.answers.yahoo.com/>
> > >
> > >
> > >
> > >
> > > ------------------------------
> > >
> > > Here's a new way to find what you're looking for - Yahoo! Answers<http://us.rd.yahoo.com/mail/in/yanswers/*http:/in.answers.yahoo.com/>
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___

