]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/button.mm
Wrappers for *ToText
[wxWidgets.git] / src / cocoa / button.mm
index c68e9596edefb8273b219069ed17089b19a25ecf..5bd7101249e6798f3d79cd7f961ccb7ad7b302b4 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     2002/12/30
 // RCS-ID:      $Id: 
 // Copyright:   (c) 2002 David Elliott
-// Licence:    wxWindows license
+// Licence:    wxWidgets licence
 /////////////////////////////////////////////////////////////////////////////
 
 #include "wx/wxprec.h"
@@ -32,10 +32,10 @@ bool wxButton::Create(wxWindow *parent, wxWindowID winid,
             const wxValidator& validator, const wxString& name)
 {
     wxAutoNSAutoreleasePool pool;
-    wxLogDebug(wxT("Creating control with id=%d"),winid);
+    wxLogTrace(wxTRACE_COCOA,wxT("Creating control with id=%d"),winid);
     if(!CreateControl(parent,winid,pos,size,style,validator,name))
         return false;
-    wxLogDebug(wxT("Created control with id=%d"),GetId());
+    wxLogTrace(wxTRACE_COCOA,wxT("Created control with id=%d"),GetId());
     m_cocoaNSView = NULL;
     SetNSButton([[NSButton alloc] initWithFrame: MakeDefaultNSRect(size)]);
     // NOTE: YES we want to release this (to match the alloc).
@@ -60,7 +60,7 @@ wxButton::~wxButton()
 
 void wxButton::Cocoa_wxNSButtonAction(void)
 {
-    wxLogDebug(wxT("YAY!"));
+    wxLogTrace(wxTRACE_COCOA,wxT("YAY!"));
     wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId());
     InitCommandEvent(event); //    event.SetEventObject(this);
     Command(event);
@@ -68,7 +68,7 @@ void wxButton::Cocoa_wxNSButtonAction(void)
 
 wxString wxButton::GetLabel() const
 {
-    return wxString([[GetNSButton() title] lossyCString]);
+    return wxStringWithNSString([GetNSButton() title]);
 }
 
 void wxButton::SetLabel(const wxString& label)