-
- m_label = label ;
-
- Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
-
- verify_noerr ( CreateRadioButtonControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , CFSTR("") ,
- 0 , false /* no autotoggle */ , (ControlRef*) &m_macControl ) ) ;
-
- MacPostControlCreate(pos,size) ;
-
- m_cycle = this ;
-
- if (HasFlag(wxRB_GROUP))
- {
- AddInCycle( NULL ) ;
- }
- else
- {
- /* search backward for last group start */
- wxRadioButton *chief = (wxRadioButton*) NULL;
- wxWindowList::Node *node = parent->GetChildren().GetLast();
- while (node)
+
+ m_labelOrig = m_label = label;
+
+ Rect bounds = wxMacGetBoundsForControl( this, pos, size );
+
+ m_peer = new wxMacControl( this );
+ OSStatus err = CreateRadioButtonControl(
+ MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds, CFSTR(""),
+ 0, false /* no autotoggle */, m_peer->GetControlRefAddr() );
+ verify_noerr( err );
+
+ MacPostControlCreate( pos, size );
+
+ m_cycle = this;
+
+ if (HasFlag( wxRB_GROUP ))