In Flex 3, mx.core.Application.application from anywhere should give you
access to the Application and thus its stage.

In Flex 4, use FlexGlobals.topLevelApplication.

-Alex

On 6/25/15, 10:59 AM, "mark goldin" <markzolo...@gmail.com> wrote:

>Alex, I need to use it from a command class that does not have
>systemManager or its stages. How do I go about it?
>
>On Thu, Jun 25, 2015 at 11:34 AM Javier Guerrero García
><javi...@gmail.com>
>wrote:
>
>> More on that:
>>
>> 
>>http://www.jamesward.com/2008/11/21/drunk-on-software-episode-3-performan
>>ce-pitfalls-of-flexs-arraycollection/
>>
>> On Thu, Jun 25, 2015 at 6:29 PM, Javier Guerrero García
>><javi...@gmail.com
>> >
>> wrote:
>>
>> > Hi Mark:
>> >
>> > A long shot here: are you sure that, while you are processing the XML,
>> > you're NOT triggering constant UI updates on each operation? For
>> instance:
>> > if after processing each XML item, you are adding the final result to
>>an
>> > ArrayCollection, and you have some rendering component bound to that
>> > ArrayCollection, that could cause a total repaint of the item
>>renderers
>> FOR
>> > EACH XML ITEM processed, hence causing the timeout. Something similar
>> > happened to me a while ago, and after noticing and solving it, I can
>>say
>> > that 60 seconds are more than enough to process a few hundreds of
>> thousand
>> > XML items, and unless your XML is REALLY huge that should be enough :)
>> >
>> > If that applies, the obvious workaround is:
>> >
>> > 1. Do all your updates and additions on a new ArrayCollection (not on
>>the
>> > one bound to the component's dataProvider), and then just swap the
>> > dataProvider of the component to point to the newly populated
>> > ArrayCollection instead
>> > 2. Or call "thefunctionthatdisabledautoupdates" in advance (don't
>> remember
>> > the exact name right now) on the bound arraycollection before starting
>> > processing your XML, modify/update your arraycollection items, and
>>then
>> > enabling it afterwards.
>> >
>> > P.S. "myCollection.disableAutoUpdate(); ", that was it :)
>> >
>> 
>>http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf668
>>d2-7fe7.html
>> >
>> > P.P.S. If none of that applies.... would some kind of "pagination" on
>>the
>> > UI solve it?
>> >
>> > On Thu, Jun 25, 2015 at 3:52 PM, mark goldin <markzolo...@gmail.com>
>> > wrote:
>> >
>> >> I have a large xml data that UI needs to process. I am getting the
>>above
>> >> message about timing out. Not sure I can break my function into
>>smaller
>> >> pieces. Any other idea?
>> >>
>> >> Thanks
>> >>
>> >
>> >
>>

Reply via email to