extern MenuHandle NewUniqueMenu() ;
wxChoice::~wxChoice()
{
- // DeleteMenu( m_macPopUpMenuId ) ;
+ if ( HasClientObjectData() )
+ {
+ size_t i, max = GetCount();
+
+ for ( i = 0; i < max; ++i )
+ delete GetClientObject(i);
+ }
+
+ // DeleteMenu( m_macPopUpMenuId ) ;
// DisposeMenu( m_macPopUpMenuHandle ) ;
}
bool wxChoice::Create(wxWindow *parent, wxWindowID id,
// ----------------------------------------------------------------------------
int wxChoice::DoAppend(const wxString& item)
{
- Str255 label;
- wxMenuItem::MacBuildMenuString( label , NULL , NULL , item ,false);
- MacAppendMenu(MAC_WXHMENU( m_macPopUpMenuHandle ) , "\pA");
- SetMenuItemText(MAC_WXHMENU( m_macPopUpMenuHandle ) ,
- (SInt16) ::CountMenuItems(MAC_WXHMENU( m_macPopUpMenuHandle ) ), label);
- // was AppendMenu( MAC_WXHMENU( m_macPopUpMenuHandle ) , label ) ;
+ UMAAppendMenuItem(MAC_WXHMENU( m_macPopUpMenuHandle ) , item);
m_strings.Add( item ) ;
m_datas.Add( NULL ) ;
int index = m_strings.GetCount() - 1 ;
}
return wxSize(lbWidth, lbHeight);
-}
\ No newline at end of file
+}