]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/button.mm
made wxFFile a bit more safe: don't crash when Tell() and Length() are called on...
[wxWidgets.git] / src / cocoa / button.mm
index 7b93013217cb15932c6238b39e7a38406a41fb49..f9d006b3a72232f41f5bf565a172441736645c99 100644 (file)
@@ -32,10 +32,10 @@ bool wxButton::Create(wxWindow *parent, wxWindowID winid,
             const wxValidator& validator, const wxString& name)
 {
     wxAutoNSAutoreleasePool pool;
-    wxLogDebug("Creating control with id=%d",winid);
+    wxLogDebug(wxT("Creating control with id=%d"),winid);
     if(!CreateControl(parent,winid,pos,size,style,validator,name))
         return false;
-    wxLogDebug("Created control with id=%d",GetId());
+    wxLogDebug(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("YAY!");
+    wxLogDebug(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)