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
Highlighted
New Contributor
Posts: 3
Registered: ‎04-28-2012
My Device: Torch 9800
My Carrier: Telus
Accepted Solution

Creating tabs for screen example

Hi,

 

In the page: http://developer.blackberry.com/native/documentation/cascades/ui/navigation/multiple_screens_tabs.ht...

 

The example for the "Using a TabbedPane in C++" is giving me the error:

 

cannot call member function 'void bb::cascades::Application::setScene(bb::cascades::AbstractPane*)' without object

 

From the line:

// Display the TabbedPane
Application::setScene(root);
 
I have on top of applicationUI.cpp:
 

#include

<bb/cascades/Application>
 
And from my understanding, the setScene is part of the Application and root should be the object.
 
Am I missing something? (Surely...)
 
Thanks in advance,
 
Pierre Forget
Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Creating tabs for screen example

Hi,

setScene expects an object, but you're calling it as static class function. Try:

Application::instance()->setScene(root)

 


Andrey Fidrya, @zmeyc on twitter
New Contributor
Posts: 3
Registered: ‎04-28-2012
My Device: Torch 9800
My Carrier: Telus

Re: Creating tabs for screen example

Thanks, it solved the problem.

 

I think they should update the example page.