]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/choice.mm
Whitespaces, tabs and fix to the lack of empty line at end.
[wxWidgets.git] / src / cocoa / choice.mm
index 3dd3ae306b1cf714705a039c153b8d2d17dcf277..ba97699d8e82b955a9f825fa16e4143c7fa2019a 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     2003/03/16
 // RCS-ID:      $Id: 
 // Copyright:   (c) 2003 David Elliott
-// Licence:    wxWindows license
+// Licence:    wxWidgets licence
 /////////////////////////////////////////////////////////////////////////////
 
 #include "wx/wxprec.h"
@@ -18,6 +18,7 @@
 #endif //WX_PRECOMP
 
 #include "wx/cocoa/string.h"
+#include "wx/cocoa/autorelease.h"
 
 #import <AppKit/NSPopUpButton.h>
 #import <AppKit/NSMenu.h>
@@ -56,6 +57,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID winid,
             const wxValidator& validator,
             const wxString& name)
 {
+    wxAutoNSAutoreleasePool pool;
     if(!CreateControl(parent,winid,pos,size,style,validator,name))
         return false;
 
@@ -158,6 +160,7 @@ int wxChoice::GetCount() const
 
 wxString wxChoice::GetString(int n) const
 {
+    wxAutoNSAutoreleasePool pool;
     return wxStringWithNSString([(NSPopUpButton*)m_cocoaNSView itemTitleAtIndex:n]);
 }
 
@@ -232,6 +235,7 @@ wxClientData* wxChoice::DoGetItemClientObject(int n) const
 
 void wxChoice::SetSelection(int n)
 {
+    wxAutoNSAutoreleasePool pool;
     [(NSPopUpButton*)m_cocoaNSView selectItemAtIndex:n];
 }