NSTableView Drag and Drop doesn't work

2009-03-17 Thread Jushin
In MyDocument.xib, I have a table and an array list (dataList) for data source. Then I created a subclass of NSArrayController (dataListController) and linked the array list (dataList) to this class. And in the dataListcontroller, I made an outlet of the table and made a connection. Ok, that's my

Re: NSTableView Drag and Drop doesn't work

2009-03-17 Thread Jushin
I did further investigation and found the reason. It was because the problem of regsterForDraggedTypes I just wanted to filter out images, so I used following to define types: NSArray* types = (NSArray*)CGImageSourceCopyTypeIdentifiers(); and then set it as, [tableView

Re: NSTableView Drag and Drop doesn't work

2009-03-17 Thread Nick Zitzmann
On Mar 17, 2009, at 9:41 AM, Jushin wrote: It didn't work. I only could make it work after I changed this to: [tableView registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType,nil]]; So, how can I filter image files for drag and drop? You have to do that manually in your

Re: NSTableView Drag and Drop doesn't work

2009-03-17 Thread Corbin Dunn
On Mar 17, 2009, at 8:41 AM, Jushin wrote: I did further investigation and found the reason. It was because the problem of regsterForDraggedTypes I just wanted to filter out images, so I used following to define types: NSArray* types = (NSArray*)CGImageSourceCopyTypeIdentifiers(); and