If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
New Contributor
superfeeler
Posts: 8
Registered: ‎04-24-2012
My Device: bb9000
My Carrier: t-mobile

One question about cascades page switch

As the sample apps tell us how to manage multi pages with NavigationPane,

and the pages is displayed by function call "Application::setScene(root);"

 

So, I have one idea, could we call this function multi times to display single page instead of using NavigationPane.

 

Is there any risks? In simulator, when I call the function "Application::setScene(root);" frequently, the app will crash. what's the reason?

and another question is, how does the implement of NavigationPane::smileytongue:ush works? why this can display single pages?


Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: One question about cascades page switch

Please refer to the documentation for the supported ways to display multiple screens in your application:

https://bdsc.webapps.blackberry.com/cascades/documentation/ui/navigation/index.html

 

Are there any issues to using NavigationPane in your application?

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
New Contributor
superfeeler
Posts: 8
Registered: ‎04-24-2012
My Device: bb9000
My Carrier: t-mobile

Re: One question about cascades page switch

I experineced the navigation pane, but when page swith, there is a default animation, one page smoothly flips to another page. and navigation pane is hard to manage too many pages, developer will find it is hard to find which page he want to navigate.

 

in navigation pane, there is a methond deprecatedPushQmlByString,

how does this function switch page?

 

could bb expose some detail info?

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: One question about cascades page switch

How is it hard to manage? Could you expand on the issues being experienced?

 

If your problem is clearly stated then we can start looking into solutions.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer
My Carrier: developer

Re: One question about cascades page switch

The navigation pane is probably not what you are looking for.  It's primary intent is a stack of panes, not random access.  However, it might be the right choice if you want an interesting effect where switching pages goes through a basic background. You could try having the navigation pane have a background and the current page.  Pop (or pop and delete) the current page and push the replacement page.

 

The sample weatherguesser shows an example use of tabbed pane.

 

I haven't tried this yet, but I expect what you want is a Pane.  setContent to the new page.  Keep in mind that as per the very clear documentation, the pane owns all content and frees it when the pane is deleted.  So you could keep your content in a hash table, and set content to the page of interest.

 

Let us know if this approach makes sense for you; in the meantime I'll try out this technique.

 

 

Please use plain text.
BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer
My Carrier: developer

Re: One question about cascades page switch

Also look at the stamp collector sample.   When you click on a stamp, it shows a pane of interest.

Please use plain text.