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

Changing Pages in Application Menu

 

 

I'm adding an Application Menu, using the example in C++ from here: https://developer.blackberry.com/cascades/documentation/ui/navigation/menus.html

 

// Create the application menu
Menu *menu = new Menu;
 
// Create the actions and add them to the menu
ActionItem *actionOne = ActionItem::create()
                        .title("Action 1");
ActionItem *actionTwo = ActionItem::create()
                        .title("Action 2");
menu->addAction(actionOne);
menu->addAction(actionTwo);
 
// Set the menu of the application
Application::instance()->setMenu(menu);

 Unfortunatly the example, does not go into how to change a page when an action is pressed.

 

Does anyone know how to do this?

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Changing Pages in Application Menu

anyone?

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Developer
Posts: 402
Registered: ‎04-04-2012
My Device: BlackBerry Z30/Z10/Z10LE/Q10/PlayBook

Re: Changing Pages in Application Menu

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

Re: Changing Pages in Application Menu

That thread refers to Navigation Pane and not Menu. Plus it's not in C++
--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Developer
Posts: 402
Registered: ‎04-04-2012
My Device: BlackBerry Z30/Z10/Z10LE/Q10/PlayBook

Re: Changing Pages in Application Menu

@JeffLemon,

 

  That is code that shows an Application Menu in cascades.The documentation shows the difference.

 

hhttps://developer.blackberry.com/cascades/reference/bb__cascades__menu.html

 

The only way that I was able to get the application menu to work is with a navigation pane and the additional code to limit it to one menu screen.

 

Since this is the cascades development form, it is appropriate. If you want native code, then you might want to post to the Native Development forum.

 

http://supportforums.blackberry.com/t5/Native-Development/bd-p/native_sdk

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

Re: Changing Pages in Application Menu

[ Edited ]
bool res = QObject::connect(actionOne, SIGNAL(triggered()), this, SLOT(handleAction1()));
	 Q_ASSERT(res);
	 Q_UNUSED(res);

 This works.

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone