You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Christofer Dutz <ch...@c-ware.de> on 2016/08/25 13:03:49 UTC

Flex mobile: prevent re-creating view when doing navigator.popView()

Hi,


I am working on a little mobile application. Currently I have one view which is sort of like a shedule-view (Couldn't get the flexlib one to work). Layouting takes some time so I would like to reduce the number of times this is done. Currently if I open die view, it layouts for about 2 seconds and all is good then. Now if I select an entry and open the details view and come back using navigator.popView() the layouting is done again.


Is there a way to prevent this? I always thought the views are like a stack and as soon as you pop something from the top, the last one below is shown. Not only would the speed up the user experience, but also the user would be in the same position he was when opening the detail view.


Chris

AW: Flex mobile: prevent re-creating view when doing navigator.popView()

Posted by Christofer Dutz <ch...@c-ware.de>.
Oh well :-)


Guess I was mis-lead by the terminology push and pop ;-)

But I tried the distructionPolicy property and now my application works like I wanted it to ... thanks again.


Chris

________________________________
Von: Clint M <cm...@gmail.com>
Gesendet: Donnerstag, 25. August 2016 21:39:41
An: users@flex.apache.org
Betreff: Re: Flex mobile: prevent re-creating view when doing navigator.popView()

http://www.adobe.com/devnet/flex/articles/flex-mobile-development-tips-tricks-pt1.html#articlecontentAdobe_numberedheader

The relevant part is:
"In Flex 4.5, only one View is active at any given time. By default, all
other Views will be destroyed and recreated when needed. This behavior is
controlled by the destructionPolicy property on the View class, which is
set to auto by default. If you set the value of this property to never ,
the View will be cached and hold its state until it is reactivated via a
call to navigator.popView() ."

On Thu, Aug 25, 2016 at 12:20 PM, Christofer Dutz <christofer.dutz@c-ware.de
> wrote:

> Hi Clint,
>
>
> thanks for that tip.
>
>
> That sounds as if the view would remain in memory, even if it is "popped"
> from the stack. I would not be expecting that.
>
>
> But I'll give that a try.
>
>
> Chris
>
> ________________________________
> Von: Clint M <cm...@gmail.com>
> Gesendet: Donnerstag, 25. August 2016 15:44:12
> An: users@flex.apache.org
> Betreff: Re: Flex mobile: prevent re-creating view when doing
> navigator.popView()
>
> er… i guess destructionPolicy="never"
>
> On Thu, Aug 25, 2016 at 6:42 AM, Clint M <cm...@gmail.com> wrote:
>
> > destructionPolicy=”none”
> >
> > http://help.adobe.com/en_US/FlashPlatform/reference/
> actionscript/3/spark/
> > components/View.html#destructionPolicy
> >
> > On Thu, Aug 25, 2016 at 6:03 AM, Christofer Dutz <
> > christofer.dutz@c-ware.de> wrote:
> >
> >> Hi,
> >>
> >>
> >> I am working on a little mobile application. Currently I have one view
> >> which is sort of like a shedule-view (Couldn't get the flexlib one to
> >> work). Layouting takes some time so I would like to reduce the number of
> >> times this is done. Currently if I open die view, it layouts for about 2
> >> seconds and all is good then. Now if I select an entry and open the
> details
> >> view and come back using navigator.popView() the layouting is done
> again.
> >>
> >>
> >> Is there a way to prevent this? I always thought the views are like a
> >> stack and as soon as you pop something from the top, the last one below
> is
> >> shown. Not only would the speed up the user experience, but also the
> user
> >> would be in the same position he was when opening the detail view.
> >>
> >>
> >> Chris
> >>
> >
> >
>

Re: Flex mobile: prevent re-creating view when doing navigator.popView()

Posted by Clint M <cm...@gmail.com>.
http://www.adobe.com/devnet/flex/articles/flex-mobile-development-tips-tricks-pt1.html#articlecontentAdobe_numberedheader

The relevant part is:
"In Flex 4.5, only one View is active at any given time. By default, all
other Views will be destroyed and recreated when needed. This behavior is
controlled by the destructionPolicy property on the View class, which is
set to auto by default. If you set the value of this property to never ,
the View will be cached and hold its state until it is reactivated via a
call to navigator.popView() ."

On Thu, Aug 25, 2016 at 12:20 PM, Christofer Dutz <christofer.dutz@c-ware.de
> wrote:

> Hi Clint,
>
>
> thanks for that tip.
>
>
> That sounds as if the view would remain in memory, even if it is "popped"
> from the stack. I would not be expecting that.
>
>
> But I'll give that a try.
>
>
> Chris
>
> ________________________________
> Von: Clint M <cm...@gmail.com>
> Gesendet: Donnerstag, 25. August 2016 15:44:12
> An: users@flex.apache.org
> Betreff: Re: Flex mobile: prevent re-creating view when doing
> navigator.popView()
>
> er… i guess destructionPolicy="never"
>
> On Thu, Aug 25, 2016 at 6:42 AM, Clint M <cm...@gmail.com> wrote:
>
> > destructionPolicy=”none”
> >
> > http://help.adobe.com/en_US/FlashPlatform/reference/
> actionscript/3/spark/
> > components/View.html#destructionPolicy
> >
> > On Thu, Aug 25, 2016 at 6:03 AM, Christofer Dutz <
> > christofer.dutz@c-ware.de> wrote:
> >
> >> Hi,
> >>
> >>
> >> I am working on a little mobile application. Currently I have one view
> >> which is sort of like a shedule-view (Couldn't get the flexlib one to
> >> work). Layouting takes some time so I would like to reduce the number of
> >> times this is done. Currently if I open die view, it layouts for about 2
> >> seconds and all is good then. Now if I select an entry and open the
> details
> >> view and come back using navigator.popView() the layouting is done
> again.
> >>
> >>
> >> Is there a way to prevent this? I always thought the views are like a
> >> stack and as soon as you pop something from the top, the last one below
> is
> >> shown. Not only would the speed up the user experience, but also the
> user
> >> would be in the same position he was when opening the detail view.
> >>
> >>
> >> Chris
> >>
> >
> >
>

AW: Flex mobile: prevent re-creating view when doing navigator.popView()

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Clint,


thanks for that tip.


That sounds as if the view would remain in memory, even if it is "popped" from the stack. I would not be expecting that.


But I'll give that a try.


Chris

________________________________
Von: Clint M <cm...@gmail.com>
Gesendet: Donnerstag, 25. August 2016 15:44:12
An: users@flex.apache.org
Betreff: Re: Flex mobile: prevent re-creating view when doing navigator.popView()

er… i guess destructionPolicy="never"

On Thu, Aug 25, 2016 at 6:42 AM, Clint M <cm...@gmail.com> wrote:

> destructionPolicy=”none”
>
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/
> components/View.html#destructionPolicy
>
> On Thu, Aug 25, 2016 at 6:03 AM, Christofer Dutz <
> christofer.dutz@c-ware.de> wrote:
>
>> Hi,
>>
>>
>> I am working on a little mobile application. Currently I have one view
>> which is sort of like a shedule-view (Couldn't get the flexlib one to
>> work). Layouting takes some time so I would like to reduce the number of
>> times this is done. Currently if I open die view, it layouts for about 2
>> seconds and all is good then. Now if I select an entry and open the details
>> view and come back using navigator.popView() the layouting is done again.
>>
>>
>> Is there a way to prevent this? I always thought the views are like a
>> stack and as soon as you pop something from the top, the last one below is
>> shown. Not only would the speed up the user experience, but also the user
>> would be in the same position he was when opening the detail view.
>>
>>
>> Chris
>>
>
>

Re: Flex mobile: prevent re-creating view when doing navigator.popView()

Posted by Clint M <cm...@gmail.com>.
er… i guess destructionPolicy="never"

On Thu, Aug 25, 2016 at 6:42 AM, Clint M <cm...@gmail.com> wrote:

> destructionPolicy=”none”
>
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/
> components/View.html#destructionPolicy
>
> On Thu, Aug 25, 2016 at 6:03 AM, Christofer Dutz <
> christofer.dutz@c-ware.de> wrote:
>
>> Hi,
>>
>>
>> I am working on a little mobile application. Currently I have one view
>> which is sort of like a shedule-view (Couldn't get the flexlib one to
>> work). Layouting takes some time so I would like to reduce the number of
>> times this is done. Currently if I open die view, it layouts for about 2
>> seconds and all is good then. Now if I select an entry and open the details
>> view and come back using navigator.popView() the layouting is done again.
>>
>>
>> Is there a way to prevent this? I always thought the views are like a
>> stack and as soon as you pop something from the top, the last one below is
>> shown. Not only would the speed up the user experience, but also the user
>> would be in the same position he was when opening the detail view.
>>
>>
>> Chris
>>
>
>

Re: Flex mobile: prevent re-creating view when doing navigator.popView()

Posted by Clint M <cm...@gmail.com>.
destructionPolicy=”none”

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/View.html#destructionPolicy

On Thu, Aug 25, 2016 at 6:03 AM, Christofer Dutz <ch...@c-ware.de>
wrote:

> Hi,
>
>
> I am working on a little mobile application. Currently I have one view
> which is sort of like a shedule-view (Couldn't get the flexlib one to
> work). Layouting takes some time so I would like to reduce the number of
> times this is done. Currently if I open die view, it layouts for about 2
> seconds and all is good then. Now if I select an entry and open the details
> view and come back using navigator.popView() the layouting is done again.
>
>
> Is there a way to prevent this? I always thought the views are like a
> stack and as soon as you pop something from the top, the last one below is
> shown. Not only would the speed up the user experience, but also the user
> would be in the same position he was when opening the detail view.
>
>
> Chris
>