]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/tabctrl.cpp
add implementation fallback for not yet instantiated control peers
[wxWidgets.git] / src / mac / carbon / tabctrl.cpp
index e96fb25f807e21866b7c4a03a36326d4de389539..a8b350e713c53c7d1200c0bab4343c5694d83a94 100644 (file)
@@ -56,8 +56,10 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
             tabsize = kControlSizeSmall; 
     }
     
+    m_peer = new wxMacControl() ;
     verify_noerr ( CreateTabsControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds ,
-     tabsize , tabstyle, 0, NULL, (ControlRef*) &m_macControl) ); 
+     tabsize , tabstyle, 0, NULL,  m_peer->GetControlRefAddr() ) );
+    
 
     MacPostControlCreate(pos,size) ;
     return TRUE ;