Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Robdob
Posts: 225
Registered: ‎01-31-2013
My Device: Developer
Accepted Solution

What Signal should I listen to in order to know when a page is being popped from the navigation pane

Hi,

 

Is there a signal on the page level that will tell me when a page is being popped fromthe navigation pane.  I would like to be able to stop some background processing thats occuring on the page when it has been popped and no longer in view.

 

Where would I be best to handle this ? I know that this is a onPopTransitionEnded on the navigation pane but I would prefer to handle it within the page qml file if possible...

 

Thanks,



GeoYeo - Free Local classifieds - Built for Blackberry 10, if you like it please Rate It and Share it!
Developer
Benecore
Posts: 540
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....

Re: What Signal should I listen to in order to know when a page is being popped from the navigation pane

[ Edited ]

You can use own property on the page and chenge it inside onPushTransitionEnded / onPopTransitionEnded
For example:

Page{
    property bool isActive: false
    onIsActiveChanged:{
        If (isActive){
            // start processing 
        }else{
            // stop processing 
        }
    }
    ....
}

And

 

onPushTransitionEnded: page.isActive = true
onPopTransitionEnded: page.isActive = false


If helped give a like. If your problem was solved mark the post as "Solution"
Portfolio: BlackBerry Nokia
Social: Twitter | Facebook
About Me / Blog DevPDA | Blog
Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: What Signal should I listen to in order to know when a page is being popped from the navigation pane

note that, if you use navigateTo, you also have to implement the onNavigateToTransitionEnded
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Benecore
Posts: 540
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....

Re: What Signal should I listen to in order to know when a page is being popped from the navigation pane

Yop, like :smileywink:


If helped give a like. If your problem was solved mark the post as "Solution"
Portfolio: BlackBerry Nokia
Social: Twitter | Facebook
About Me / Blog DevPDA | Blog
Developer
Robdob
Posts: 225
Registered: ‎01-31-2013
My Device: Developer

Re: What Signal should I listen to in order to know when a page is being popped from the navigation pane

works perfectly..  thank you very much...



GeoYeo - Free Local classifieds - Built for Blackberry 10, if you like it please Rate It and Share it!
Developer
Benecore
Posts: 540
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....

Re: What Signal should I listen to in order to know when a page is being popped from the navigation pane

You're welcome :smileywink:


If helped give a like. If your problem was solved mark the post as "Solution"
Portfolio: BlackBerry Nokia
Social: Twitter | Facebook
About Me / Blog DevPDA | Blog