diff --git a/include/wx/osx/cocoa/dataview.h b/include/wx/osx/cocoa/dataview.h index 3406642f1f..ed79f03b94 100644 --- a/include/wx/osx/cocoa/dataview.h +++ b/include/wx/osx/cocoa/dataview.h @@ -250,7 +250,7 @@ private: // owned by the set. Furthermore, children of the last parent are stored // in a linear list. // -@interface wxCocoaOutlineDataSource : NSObject +@interface wxCocoaOutlineDataSource : NSObject wxOSX_10_6_AND_LATER() { // descriptors specifying the sorting (currently the array only holds one // object only) @@ -398,7 +398,7 @@ private: // wxCocoaOutlineView // ============================================================================ -@interface wxCocoaOutlineView : NSOutlineView +@interface wxCocoaOutlineView : NSOutlineView wxOSX_10_6_AND_LATER() { @private // column and row of the cell being edited or -1 if none diff --git a/include/wx/osx/cocoa/private.h b/include/wx/osx/cocoa/private.h index dc7478372c..e7ce32fa9a 100644 --- a/include/wx/osx/cocoa/private.h +++ b/include/wx/osx/cocoa/private.h @@ -287,7 +287,7 @@ protected : @end - @interface wxNSTextField : NSTextField + @interface wxNSTextField : NSTextField wxOSX_10_6_AND_LATER() { wxNSTextFieldEditor* fieldEditor; } @@ -297,7 +297,7 @@ protected : @end - @interface wxNSSecureTextField : NSSecureTextField + @interface wxNSSecureTextField : NSSecureTextField wxOSX_10_6_AND_LATER() { } diff --git a/src/osx/carbon/colordlgosx.mm b/src/osx/carbon/colordlgosx.mm index df8e2263a6..067e5b413c 100644 --- a/src/osx/carbon/colordlgosx.mm +++ b/src/osx/carbon/colordlgosx.mm @@ -32,21 +32,16 @@ IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog) -// Cocoa headers -#include "wx/cocoa/autorelease.h" -#include "wx/cocoa/string.h" +#include "wx/osx/private.h" -#import -#import -#import -#import -#import +#import +#import // --------------------------------------------------------------------------- // wxCPWCDelegate - Window Closed delegate // --------------------------------------------------------------------------- -@interface wxCPWCDelegate : NSObject +@interface wxCPWCDelegate : NSObject wxOSX_10_6_AND_LATER() { bool m_bIsClosed; } diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm index 3a244c6829..be4074a36e 100644 --- a/src/osx/cocoa/dataview.mm +++ b/src/osx/cocoa/dataview.mm @@ -21,8 +21,8 @@ #include "wx/utils.h" #endif -#include "wx/osx/cocoa/dataview.h" #include "wx/osx/private.h" +#include "wx/osx/cocoa/dataview.h" #include "wx/renderer.h" // ============================================================================ @@ -603,6 +603,7 @@ outlineView:(NSOutlineView*)outlineView ::CFRelease(osxData); delete dataObjects; } + return dragSuccessful; } -(id) outlineView:(NSOutlineView*)outlineView @@ -705,7 +706,7 @@ outlineView:(NSOutlineView*)outlineView sortingColumnPtr:dvc->GetColumn([[newDescriptor key] intValue]) ascending:[newDescriptor ascending]] autorelease]]; } - [[outlineView dataSource] setSortDescriptors:wxSortDescriptors]; + [(wxCocoaOutlineDataSource*)[outlineView dataSource] setSortDescriptors:wxSortDescriptors]; // send first the event to wxWidgets that the sorting has changed so that // the program can do special actions before the sorting actually starts: diff --git a/src/osx/cocoa/nonownedwnd.mm b/src/osx/cocoa/nonownedwnd.mm index 76e2f4b9d5..b6e4af920f 100644 --- a/src/osx/cocoa/nonownedwnd.mm +++ b/src/osx/cocoa/nonownedwnd.mm @@ -194,7 +194,7 @@ typedef void (*wxOSX_NoResponderHandlerPtr)(NSView* self, SEL _cmd, SEL selector // controller // -@interface wxNonOwnedWindowController : NSObject +@interface wxNonOwnedWindowController : NSObject wxOSX_10_6_AND_LATER() { } diff --git a/src/osx/cocoa/notebook.mm b/src/osx/cocoa/notebook.mm index a23bf5157a..bba36f5d94 100644 --- a/src/osx/cocoa/notebook.mm +++ b/src/osx/cocoa/notebook.mm @@ -30,7 +30,7 @@ // controller // -@interface wxTabViewController : NSObject +@interface wxTabViewController : NSObject wxOSX_10_6_AND_LATER() { } diff --git a/src/osx/cocoa/textctrl.mm b/src/osx/cocoa/textctrl.mm index aca568bcea..c288d78703 100644 --- a/src/osx/cocoa/textctrl.mm +++ b/src/osx/cocoa/textctrl.mm @@ -524,14 +524,16 @@ wxSize wxNSTextViewControl::GetBestSize() const size.y += [m_textView textContainerInset].height; return size; } + return wxSize(0,0); } // wxNSTextFieldControl wxNSTextFieldControl::wxNSTextFieldControl( wxWindow *wxPeer, WXWidget w ) : wxWidgetCocoaImpl(wxPeer, w) { - m_textField = (NSTextField*) w; - [m_textField setDelegate: w]; + NSTextField wxOSX_10_6_AND_LATER() *tf = (NSTextField*) w; + m_textField = tf; + [m_textField setDelegate: tf]; m_selStart = m_selEnd = 0; m_hasEditor = [w isKindOfClass:[NSTextField class]]; } diff --git a/src/osx/cocoa/toolbar.mm b/src/osx/cocoa/toolbar.mm index b0d451a171..0add59ad00 100644 --- a/src/osx/cocoa/toolbar.mm +++ b/src/osx/cocoa/toolbar.mm @@ -269,7 +269,7 @@ private: @end -@interface wxNSToolbarDelegate : NSObject +@interface wxNSToolbarDelegate : NSObject wxOSX_10_6_AND_LATER() { } diff --git a/src/osx/cocoa/utils.mm b/src/osx/cocoa/utils.mm index 0f2eb3e517..36ce2bb0d4 100644 --- a/src/osx/cocoa/utils.mm +++ b/src/osx/cocoa/utils.mm @@ -79,7 +79,7 @@ void wxMacWakeUp() #if wxUSE_GUI -@interface wxNSAppController : NSObject +@interface wxNSAppController : NSObject wxOSX_10_6_AND_LATER() { } diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index c34c897812..180121d928 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -40,7 +40,7 @@ NSView* GetViewFromResponder( NSResponder* responder ) NSView* view = nil; if ( [responder isKindOfClass:[NSTextView class]] ) { - NSView* delegate = [(NSTextView*)responder delegate]; + NSView* delegate = (NSView*) [(NSTextView*)responder delegate]; if ( [delegate isKindOfClass:[NSTextField class] ] ) view = delegate; else