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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Developer
level32
Posts: 52
Registered: ‎03-29-2012
My Carrier: Telus

Re: Coming from Android, is there a something similar to LayoutInflater?

[ Edited ]

I'm trying to slim down my App.cpp. The idea is to have a class for each Page of the app. This way I wouldn't have functions for each page in the App.cpp (which is getting huge at this point). Common actions and functions would be available via my PageBase class and I would extend that for other custom Pages.

Please use plain text.
Developer
level32
Posts: 52
Registered: ‎03-29-2012
My Carrier: Telus

Re: Coming from Android, is there a something similar to LayoutInflater?

When I try this: 

 

Page * page = m_qmlDoc->createRootNode<Page>();
setContent(page->content());

 I get these errors: 

 

ERROR:: VisualNode: appendNodeChild: Child already got a parent
ERROR:: GroupNode: appendChild: failed to add child node.

 

Please use plain text.
Administrator
MSohm
Posts: 12,957
Registered: ‎07-09-2008
My Carrier: Bell

Re: Coming from Android, is there a something similar to LayoutInflater?

Note that page should not be extended.  It might break compatibility in future.  The only extendable class is CustomControl. 

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Developer
level32
Posts: 52
Registered: ‎03-29-2012
My Carrier: Telus

Re: Coming from Android, is there a something similar to LayoutInflater?

That's what I wanted to hear. Thanks.
Please use plain text.