Looks like that would 'work' but it is usually a bad idea to pass a
view component to a service method.

Another option would be to have the method that is parsing the XML
file to fire off events (or in PureMVC notifications) that something
managing the progress bar can listen for.  The event (or notification)
could tell the listener how far along the update method is.

Not sure how well it would actually work but in theory it should work.
 It would be better if you could page the data as Tom suggested
because  one big fat XML response will still take some time initially
just to receive during which time you still would have the user
waiting with no status other than 'busy'.

Hope this helps...

- Todd

--- In [email protected], "Cato Paus" <[EMAIL PROTECTED]> wrote:
>
> Hi, I do it like this:
> 
> in my mxml file:
>       <mx:ControlBar paddingLeft="2" paddingRight="2" 
> paddingTop="2" paddingBottom="2">
>               <mx:ProgressBar hideEffect="{pbfadeOut}" 
> showEffect="{pbfadeIn}" visible="false" id="bpProgressBar" 
> labelPlacement="center" indeterminate="true" width="100%"/>
>       </mx:ControlBar>
>       
>       <mx:Fade id="pbfadeOut" duration="500" alphaFrom="1.0" 
> alphaTo="0.0"/>
>     <mx:Fade id="pbfadeIn" duration="500" alphaFrom="0.0" 
> alphaTo="1.0"/>
> 
> 
> 
> In my AS file with the remoteObject call and result.
> 
> private var _bpProgressBar:ProgressBar; 
>         
>         public function updateCustFileListBundle(pb:ProgressBar):void
>         {
>               this._bpProgressBar = ProgressBar(pb);
>               this._bpProgressBar.visible = true;
>               this._bpProgressBar.label = 'Oppdater data base';
>               
>               //trace
> (LicenseVOSingleton.instance.licenseVO.custFileList);
>               flexComRO.updateCustFileListBundle
> (MemberVOSingleton.getInstance().memberVO, 
> LicenseVOSingleton.instance.licenseVO);
>               flexComRO.addEventListener(ResultEvent.RESULT, 
> onUpdateCustFileListBundle);
>               CursorManager.setBusyCursor();
>               
>         }
>         
>         private function onUpdateCustFileListBundle
> (event:ResultEvent):void
>         {
>               flexComRO.removeEventListener(ResultEvent.RESULT, 
> onUpdateCustFileListBundle);
>               
>               var rs:LicenseVO = new LicenseVO();
>                       rs = event.result as LicenseVO
>               
>               //trace('************ rs ***********');
>               //trace(rs.custFileList);
>               
>               LicenseVOSingleton.instance.licenseVO = event.result 
> as LicenseVO;
>               LicenseVOSingleton.instance.createBPTree();
>               LicenseVOSingleton.instance.createMyFileTree();
>               
>               //CursorManager.removeBusyCursor();
>               
>               this._bpProgressBar.label = 'Data Oppdatert ferdig';
>               this._bpProgressBar.visible = false;
>               
>         }
> 
> 
> as you can see from the code the I send a referace from the pb into 
> my updateCustFileListBundle(pb:ProgressBar) and alter the variables.
> 
> It don't show you bytes loaded but it shows something is going on :)
> 
> 
> Cato Paus 
> www.umbrellacorp.no 
> 
> 
> 
> 
> 
> 
> --- In [email protected], "Tom Preet" <tomtpreet@> wrote:
> >
> > Hi,
> > 
> > I am using RemoteObject method within my Flex application. Here for
> > retriving data it was getting some few seconds.
> > for that I need to use Progress bar instead of using showbusy 
> cursor.
> > 
> > can anyone give me some suggestions of using progress bar with 
> remote object
> > method.
> > 
> > Thanks,
> > Tomt.
> >
>


Reply via email to