]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/listbox.mm
Refactor wxMSW helper functions to allow reuse in wxGTK.
[wxWidgets.git] / src / osx / cocoa / listbox.mm
index 02a4c62f001aa1326edc6d0008d4b35884342834..f49f1df02c9bdb88012bbccb73035f15b34c938b 100644 (file)
@@ -4,7 +4,7 @@
 // Author:      Stefan Csomor
 // Modified by:
 // Created:     1998-01-01
-// RCS-ID:      $Id: listbox.cpp 54820 2008-07-29 20:04:11Z SC $
+// RCS-ID:      $Id$
 // Copyright:   (c) Stefan Csomor
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -161,7 +161,7 @@ protected :
 
 - (id) init
 {
-    [super init];
+    self = [super init];
     column = nil;
     return self;
 }
@@ -224,7 +224,7 @@ protected:
 
 - (id) init
 {
-    [super init];
+    self = [super init];
     impl = nil;
     return self;
 }
@@ -444,7 +444,8 @@ void wxListWidgetCocoaImpl::ListSetSelection( unsigned int n, bool select, bool
 {
     // TODO
     if ( select )
-        [m_tableView selectRow: n byExtendingSelection:multi];
+        [m_tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:n]
+                    byExtendingSelection:multi];
     else
         [m_tableView deselectRow: n];
 
@@ -555,7 +556,7 @@ wxWidgetImplType* wxWidgetImpl::CreateListBox( wxWindowMac* wxpeer,
 
     // temporary hook for dnd
     [tableview registerForDraggedTypes:[NSArray arrayWithObjects:
-        NSStringPboardType, NSFilenamesPboardType, NSTIFFPboardType, NSPICTPboardType, NSPDFPboardType, nil]];
+        NSStringPboardType, NSFilenamesPboardType, (NSString*) kPasteboardTypeFileURLPromise, NSTIFFPboardType, NSPICTPboardType, NSPDFPboardType, nil]];
 
     [ds setImplementation:c];
     return c;