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()
|
wxBitmapButton::~wxBitmapButton()
|
||||||
{
|
{
|
||||||
CocoaRemoveFromParent();
|
DisassociateNSButton(m_cocoaNSView);
|
||||||
SetNSButton(NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBitmapButton::Cocoa_wxNSButtonAction(void)
|
void wxBitmapButton::Cocoa_wxNSButtonAction(void)
|
||||||
|
@@ -52,8 +52,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID winid,
|
|||||||
|
|
||||||
wxButton::~wxButton()
|
wxButton::~wxButton()
|
||||||
{
|
{
|
||||||
CocoaRemoveFromParent();
|
DisassociateNSButton(m_cocoaNSView);
|
||||||
SetNSButton(NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxButton::Cocoa_wxNSButtonAction(void)
|
void wxButton::Cocoa_wxNSButtonAction(void)
|
||||||
|
@@ -46,8 +46,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID winid,
|
|||||||
|
|
||||||
wxCheckBox::~wxCheckBox()
|
wxCheckBox::~wxCheckBox()
|
||||||
{
|
{
|
||||||
CocoaRemoveFromParent();
|
DisassociateNSButton(m_cocoaNSView);
|
||||||
SetNSButton(NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxCheckBox::SetValue(bool)
|
void wxCheckBox::SetValue(bool)
|
||||||
|
@@ -48,8 +48,7 @@ bool wxControl::Create(wxWindow *parent, wxWindowID winid,
|
|||||||
|
|
||||||
wxControl::~wxControl()
|
wxControl::~wxControl()
|
||||||
{
|
{
|
||||||
CocoaRemoveFromParent();
|
DisassociateNSControl(m_cocoaNSView);
|
||||||
SetNSControl(NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSize wxControl::DoGetBestSize() const
|
wxSize wxControl::DoGetBestSize() const
|
||||||
|
@@ -47,8 +47,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID winid,
|
|||||||
|
|
||||||
wxRadioButton::~wxRadioButton()
|
wxRadioButton::~wxRadioButton()
|
||||||
{
|
{
|
||||||
CocoaRemoveFromParent();
|
DisassociateNSButton(m_cocoaNSView);
|
||||||
SetNSButton(NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxRadioButton::SetValue(bool)
|
void wxRadioButton::SetValue(bool)
|
||||||
|
@@ -39,8 +39,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID winid,
|
|||||||
|
|
||||||
wxStaticBox::~wxStaticBox()
|
wxStaticBox::~wxStaticBox()
|
||||||
{
|
{
|
||||||
CocoaRemoveFromParent();
|
DisassociateNSBox(m_cocoaNSView);
|
||||||
SetNSBox(NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const
|
void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const
|
||||||
|
@@ -45,8 +45,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID winid,
|
|||||||
|
|
||||||
wxStaticText::~wxStaticText()
|
wxStaticText::~wxStaticText()
|
||||||
{
|
{
|
||||||
CocoaRemoveFromParent();
|
DisassociateNSTextField(m_cocoaNSView);
|
||||||
SetNSTextField(NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStaticText::SetLabel(const wxString& label)
|
void wxStaticText::SetLabel(const wxString& label)
|
||||||
|
@@ -44,8 +44,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID winid,
|
|||||||
|
|
||||||
wxTextCtrl::~wxTextCtrl()
|
wxTextCtrl::~wxTextCtrl()
|
||||||
{
|
{
|
||||||
CocoaRemoveFromParent();
|
DisassociateNSTextField(m_cocoaNSView);
|
||||||
SetNSTextField(NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTextCtrl::Cocoa_didChangeText(void)
|
void wxTextCtrl::Cocoa_didChangeText(void)
|
||||||
|
Reference in New Issue
Block a user