]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/radiobox.cpp
removed wxMsgArray definition (now in evtloop.cpp) and OnIdle() sempaphore (shouldn...
[wxWidgets.git] / src / mac / radiobox.cpp
index fbf840fc8d5cbd537a63274ab086cd8d5594a25c..bfc9b87637f4f078c4cbf824a18fe70dc97ba679 100644 (file)
@@ -77,6 +77,8 @@ wxRadioBox::wxRadioBox()
 
 wxRadioBox::~wxRadioBox()
 {
+    m_isBeingDeleted = TRUE;
+
     wxRadioButton *next,*current;
     
     current=m_radioButtonCycle->NextInCycle();
@@ -100,6 +102,9 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
                         int majorDim, long style,
                         const wxValidator& val, const wxString& name)
 {
+    if ( !wxControl::Create(parent, id, pos, size, style, val, name) )
+        return false;
+
     int i;
     
     m_noItems = n;
@@ -122,8 +127,15 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
     
     for (i = 0; i < n; i++)
     {
-        wxRadioButton *radBtn = new wxRadioButton(this, NewControlId(), wxStripMenuCodes(choices[i]),wxPoint(5,20*i+10),
-            wxDefaultSize , i == 0 ? wxRB_GROUP : 0 ) ;
+        wxRadioButton *radBtn = new wxRadioButton
+                                    (
+                                        this,
+                                        wxID_ANY,
+                                        wxStripMenuCodes(choices[i]),
+                                        wxPoint(5,20*i+10),
+                                        wxDefaultSize,
+                                        i == 0 ? wxRB_GROUP : 0
+                                    );
         if ( i == 0 )
             m_radioButtonCycle = radBtn ;
         //        m_radioButtonCycle=radBtn->AddInCycle(m_radioButtonCycle);