In the object destructor, Disassociate the object from its Cocoa counterpart
but leave m_cocoaNSView intact so base class destructors can use it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -52,8 +52,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID winid,
|
||||
|
||||
wxBitmapButton::~wxBitmapButton()
|
||||
{
|
||||
CocoaRemoveFromParent();
|
||||
SetNSButton(NULL);
|
||||
DisassociateNSButton(m_cocoaNSView);
|
||||
}
|
||||
|
||||
void wxBitmapButton::Cocoa_wxNSButtonAction(void)
|
||||
|
@@ -52,8 +52,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID winid,
|
||||
|
||||
wxButton::~wxButton()
|
||||
{
|
||||
CocoaRemoveFromParent();
|
||||
SetNSButton(NULL);
|
||||
DisassociateNSButton(m_cocoaNSView);
|
||||
}
|
||||
|
||||
void wxButton::Cocoa_wxNSButtonAction(void)
|
||||
|
@@ -46,8 +46,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID winid,
|
||||
|
||||
wxCheckBox::~wxCheckBox()
|
||||
{
|
||||
CocoaRemoveFromParent();
|
||||
SetNSButton(NULL);
|
||||
DisassociateNSButton(m_cocoaNSView);
|
||||
}
|
||||
|
||||
void wxCheckBox::SetValue(bool)
|
||||
|
@@ -48,8 +48,7 @@ bool wxControl::Create(wxWindow *parent, wxWindowID winid,
|
||||
|
||||
wxControl::~wxControl()
|
||||
{
|
||||
CocoaRemoveFromParent();
|
||||
SetNSControl(NULL);
|
||||
DisassociateNSControl(m_cocoaNSView);
|
||||
}
|
||||
|
||||
wxSize wxControl::DoGetBestSize() const
|
||||
|
@@ -47,8 +47,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID winid,
|
||||
|
||||
wxRadioButton::~wxRadioButton()
|
||||
{
|
||||
CocoaRemoveFromParent();
|
||||
SetNSButton(NULL);
|
||||
DisassociateNSButton(m_cocoaNSView);
|
||||
}
|
||||
|
||||
void wxRadioButton::SetValue(bool)
|
||||
|
@@ -39,8 +39,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID winid,
|
||||
|
||||
wxStaticBox::~wxStaticBox()
|
||||
{
|
||||
CocoaRemoveFromParent();
|
||||
SetNSBox(NULL);
|
||||
DisassociateNSBox(m_cocoaNSView);
|
||||
}
|
||||
|
||||
void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const
|
||||
|
@@ -45,8 +45,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID winid,
|
||||
|
||||
wxStaticText::~wxStaticText()
|
||||
{
|
||||
CocoaRemoveFromParent();
|
||||
SetNSTextField(NULL);
|
||||
DisassociateNSTextField(m_cocoaNSView);
|
||||
}
|
||||
|
||||
void wxStaticText::SetLabel(const wxString& label)
|
||||
|
@@ -44,8 +44,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID winid,
|
||||
|
||||
wxTextCtrl::~wxTextCtrl()
|
||||
{
|
||||
CocoaRemoveFromParent();
|
||||
SetNSTextField(NULL);
|
||||
DisassociateNSTextField(m_cocoaNSView);
|
||||
}
|
||||
|
||||
void wxTextCtrl::Cocoa_didChangeText(void)
|
||||
|
Reference in New Issue
Block a user