- // temporary define, TODO
-#if wxOSX_USE_CARBON
- m_nowpeer = new wxNonOwnedWindowCarbonImpl( this );
-#elif wxOSX_USE_COCOA
- m_nowpeer = new wxNonOwnedWindowCocoaImpl( this );
-#elif wxOSX_USE_IPHONE
- m_nowpeer = new wxNonOwnedWindowIPhoneImpl( this );
-#endif
-
- m_nowpeer->Create( parent, wxPoint(x,y) , wxSize(w,h) , style , GetExtraStyle(), name ) ;
+ m_nowpeer = wxNonOwnedWindowImpl::CreateNonOwnedWindow(this, parent, wxPoint(x,y) , wxSize(w,h) , style , GetExtraStyle(), name );