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

Posts: 41
Registered: ‎10-16-2012
My Device: Bold 9000
My Carrier: Telus

Lifecycle of a page.

I need to respond to a page being destroyed so I can save it's ui settings.  In Qt creator I used to use;




I did find  onCreationCompleted: in order to load my ui settings but can't seem to find it's opposite anywhere.

Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Lifecycle of a page.

All QObjects, of which Page is a subclass, have a destroyed signal, which is probably a match for what you're looking for: https://developer.blackberry.com/cascades/reference/bb__cascades__qmlqobject.html#destroyed

I wouldn't rely on that, personally, however, as I would worry I wasn't certain when the page was actually destroyed... I'd be more explicit and save my data when I actually closed the page, such as when the Back button were hit, or even (and also) when the application was thumbnailed (minimized) by the user.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!