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
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA
Accepted Solution

setScene not declared in this scope

Im working on the c++ Navigation Pane here:

 

https://developer.blackberry.com/cascades/documentation/ui/navigation/multiple_screens_stack.html

 

I get the error:

 

setScene was not declared in this scope.

 

Any ideas how to fix?

 

Using beta3.

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Super Contributor
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Re: setScene not declared in this scope

[ Edited ]

Hi,

You have to use following syntax to set the application setScrene method.

 

NavigationPane *rootPane = qml->createRootObject<NavigationPane>();

Application::instance()->setScene(rootPane);

 

Highlighted
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: setScene not declared in this scope

Application::instance()->setScene(rootPane); 

 


This works, why on earth is this not stated in the tutorials?

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Super Contributor
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Re: setScene not declared in this scope

That i dont know. They menioned some where in their document but i did not remeber exact where it given.

 

 

note: Press like button if the answer is helpful to you or resolved your issue.

Contributor
Posts: 16
Registered: ‎05-30-2013
My Device: Z10, Q10
My Carrier: Rogers

Re: setScene not declared in this scope

I was following the same example and I just added this line to make it works, but here if I press the button to go back to the main page and then press again to create a new page the app just crashes, is that the same for you?