+ NSMenuItem* nsmenuitem = (NSMenuItem*) pItem->GetPeer()->GetHMenuItem();
+ // make sure a call of SetSubMenu is also reflected (occurring after Create)
+ // update the native menu item accordingly
+
+ if ( pItem->IsSubMenu() )
+ {
+ wxMenu* wxsubmenu = pItem->GetSubMenu();
+ WXHMENU nssubmenu = wxsubmenu->GetHMenu();
+ if ( [nsmenuitem submenu] != nssubmenu )
+ {
+ wxsubmenu->GetPeer()->SetTitle( pItem->GetItemLabelText() );
+ [nsmenuitem setSubmenu:nssubmenu];
+ }
+ }
+