diff --git a/src/osx/iphone/button.mm b/src/osx/iphone/button.mm index 275128f191..cfc67b6349 100644 --- a/src/osx/iphone/button.mm +++ b/src/osx/iphone/button.mm @@ -32,7 +32,7 @@ wxSize wxButton::DoGetBestSize() const wxRect r ; - m_peer->GetBestRect(&r); + GetPeer()->GetBestRect(&r); if ( r.GetWidth() == 0 && r.GetHeight() == 0 ) { diff --git a/src/osx/iphone/glcanvas.mm b/src/osx/iphone/glcanvas.mm index ca71c5bda3..432cde233b 100644 --- a/src/osx/iphone/glcanvas.mm +++ b/src/osx/iphone/glcanvas.mm @@ -397,7 +397,7 @@ bool wxGLCanvas::Create(wxWindow *parent, [NSNumber numberWithBool:NO], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil]; - m_peer = new wxWidgetIPhoneImpl( this, v ); + SetPeer(new wxWidgetIPhoneImpl( this, v )); MacPostControlCreate(pos, size) ; #endif @@ -415,7 +415,7 @@ bool wxGLCanvas::SwapBuffers() WXGLContext context = WXGLGetCurrentContext(); wxCHECK_MSG(context, false, wxT("should have current context")); - wxUICustomOpenGLView* v = (wxUICustomOpenGLView*) m_peer->GetWXWidget(); + wxUICustomOpenGLView* v = (wxUICustomOpenGLView*) GetPeer()->GetWXWidget(); [v swapBuffers]; return true; } diff --git a/src/osx/iphone/toolbar.mm b/src/osx/iphone/toolbar.mm index c65ee34d66..64facb5d55 100644 --- a/src/osx/iphone/toolbar.mm +++ b/src/osx/iphone/toolbar.mm @@ -247,7 +247,7 @@ bool wxToolBar::Create( } m_macToolbar = toolbar; - m_peer = new wxWidgetIPhoneImpl( this, toolbar ); + SetPeer(new wxWidgetIPhoneImpl( this, toolbar )); MacPostControlCreate(pos, size) ; }