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
Contributor
Posts: 26
Registered: ‎01-04-2013
My Device: Playbook
My Carrier: Telus

createObject - remove old and create New of Refresh

Creating a page in NavigationPane with createObject().

 

I know when I go back this call returns true and page is just loaded.  Is there a way to destroy the first page created once it has been popped off the stack.  Or is there a way to refresh the page so as to reset all labels and textfields.

 

Dallas

Highlighted
Developer
Developer
Posts: 174
Registered: ‎03-05-2009
My Device: Dev Alpha
My Carrier: -

Re: createObject - remove old and create New of Refresh

Is there a way to destroy the first page created once it has been popped off the stack.

 onPopTransitionEnded: {

   page.destroy()

}

 

the first page is usually a child of the navpane, and hence it will be destroyed automatically when the navpane is destroyed.

Contributor
Posts: 26
Registered: ‎01-04-2013
My Device: Playbook
My Carrier: Telus

Re: createObject - remove old and create New of Refresh

Well yes that would do the job most definitely.  Does leave a bit of a problem in that it kills the parent, when I need the parent to make more children.  (sounds bad i know - worry about that) Anyways as I was saying - it would be best if I could just kill the child process and then the next time the button is pushed create a new child with updated values.

 

Thanks for the response lew. Smiley Happy