Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Adding a menu item during runtime on OSX


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Feb 27, 2015 2:51 PM Last Post By: Kenneth Czepelka
Kenneth Czepelka

Posts: 22
Registered: 1/3/06
Adding a menu item during runtime on OSX  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 24, 2015 1:32 PM
(this is a firemonkey application, using XE5) I'm trying to add menu items dynamically to a submenu item and this code works for Windows, but no menu items are added on OSX.

TMenuItem *Inputportmenuitem[10]; //create pointers to all possible devices to be shown as menu items

Inputportmenuitem[0] = new TMenuItem(InPortMenu); //create the menu object (InPortMenu is a tmenuitem component already in the main menu and trying to add menu items under this item)
String S=(String)midiin->getPortName(0).c_str(); //gets a name to be displayed as the menu item
Inputportmenuitem[0]->Text = S; //add the name to the object

Thanks.
Kenneth Czepelka

Posts: 22
Registered: 1/3/06
Re: Adding a menu item during runtime on OSX  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 27, 2015 2:51 PM   in response to: Kenneth Czepelka in response to: Kenneth Czepelka
Kenneth Czepelka wrote:
(this is a firemonkey application, using XE5) I'm trying to add menu items dynamically to a submenu item and this code works for Windows, but no menu items are added on OSX.

TMenuItem *Inputportmenuitem[10]; //create pointers to all possible devices to be shown as menu items

Inputportmenuitem[0] = new TMenuItem(InPortMenu); //create the menu object (InPortMenu is a tmenuitem component already in the main menu and trying to add menu items under this item)
String S=(String)midiin->getPortName(0).c_str(); //gets a name to be displayed as the menu item
Inputportmenuitem[0]->Text = S; //add the name to the object

Thanks.

Can anyone help with this? Thanks
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02