]> git.saurik.com Git - wxWidgets.git/commitdiff
In the object destructor, Disassociate the object from its Cocoa counterpart
authorDavid Elliott <dfe@tgwbd.org>
Sat, 12 Jul 2003 00:52:50 +0000 (00:52 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Sat, 12 Jul 2003 00:52:50 +0000 (00:52 +0000)
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

src/cocoa/bmpbuttn.mm
src/cocoa/button.mm
src/cocoa/checkbox.mm
src/cocoa/control.mm
src/cocoa/radiobut.mm
src/cocoa/statbox.mm
src/cocoa/stattext.mm
src/cocoa/textctrl.mm

index 94b40d916054c30835e3de3b180e1fe61e752ff3..9245d118c00b968a55c1bf8281fbc92a3b0e26de 100644 (file)
@@ -52,8 +52,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID winid,
 
 wxBitmapButton::~wxBitmapButton()
 {
-    CocoaRemoveFromParent();
-    SetNSButton(NULL);
+    DisassociateNSButton(m_cocoaNSView);
 }
 
 void wxBitmapButton::Cocoa_wxNSButtonAction(void)
index aa8472a8d7616d3f4a739834c025188bc2107049..46a2201e0e51a1e143bdf7236747ccad41d68131 100644 (file)
@@ -52,8 +52,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID winid,
 
 wxButton::~wxButton()
 {
-    CocoaRemoveFromParent();
-    SetNSButton(NULL);
+    DisassociateNSButton(m_cocoaNSView);
 }
 
 void wxButton::Cocoa_wxNSButtonAction(void)
index 5181c7ceda7ee5b79575965be08dff8962a22e38..71fb5d4dc44f8b8794768257ce39e8f07ba50e4d 100644 (file)
@@ -46,8 +46,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID winid,
 
 wxCheckBox::~wxCheckBox()
 {
-    CocoaRemoveFromParent();
-    SetNSButton(NULL);
+    DisassociateNSButton(m_cocoaNSView);
 }
 
 void wxCheckBox::SetValue(bool)
index 683448be990a4d8d0a30443597d1ef8d14559443..eac63d12e38e57b41cf743be37880077aad966c7 100644 (file)
@@ -48,8 +48,7 @@ bool wxControl::Create(wxWindow *parent, wxWindowID winid,
 
 wxControl::~wxControl()
 {
-    CocoaRemoveFromParent();
-    SetNSControl(NULL);
+    DisassociateNSControl(m_cocoaNSView);
 }
 
 wxSize wxControl::DoGetBestSize() const
index b3916b716b697f496285acc5e0b716a1369cb5f0..c746b29502228a1e49c47120c93b4b52c0d331b5 100644 (file)
@@ -47,8 +47,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID winid,
 
 wxRadioButton::~wxRadioButton()
 {
-    CocoaRemoveFromParent();
-    SetNSButton(NULL);
+    DisassociateNSButton(m_cocoaNSView);
 }
 
 void wxRadioButton::SetValue(bool)
index cc8487588116043c708cf5fcc20aea7e8f3cefdb..766f6773fb9fc6525f94f0f23f9bb4f7661c1bdc 100644 (file)
@@ -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
index 521ae120e0ff8c15da180fd891321ebe6daa0fc5..88574eeb03a61bc1d5b9aa1d3b2239623104cf4e 100644 (file)
@@ -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)
index e0747d89831c832284216266195ae46ee6239bf6..e062ea4f42c3c8b88b9eca0e966dedd64a01a9de 100644 (file)
@@ -44,8 +44,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID winid,
 
 wxTextCtrl::~wxTextCtrl()
 {
-    CocoaRemoveFromParent();
-    SetNSTextField(NULL);
+    DisassociateNSTextField(m_cocoaNSView);
 }
 
 void wxTextCtrl::Cocoa_didChangeText(void)