Re: How to specify the file type to Audio file when dragging...?

2009-05-18 Thread Bright
On 5/13/09 9:58 AM, Nick Zitzmann said: But how limit the file type to sound file only available when drag and drop files into tableview? You need to check for that in your validateDrop method, and return YES if the desired file type is detected and NO otherwise. And you can check the

Re: How to specify the file type to Audio file when dragging...?

2009-05-18 Thread Nick Zitzmann
On May 18, 2009, at 9:28 PM, Bright wrote: I am a novice of Cocoa. So can you tell me detailed about the specify the file type to Audio File when dragging a file to tableview? I tried the validateDrop method and NSworkspace, but failed. That depends. Can you please post your code?

Re:Re: How to specify the file type to Audio file when dragging...?

2009-05-18 Thread Bright
On May 18, 2009, at 9:28 PM, Bright wrote: I am a novice of Cocoa. So can you tell me detailed about the specify the file type to Audio File when dragging a file to tableview? I tried the validateDrop method and NSworkspace, but failed. That depends. Can you please post your

Re: How to specify the file type to Audio file when dragging...?

2009-05-18 Thread Nick Zitzmann
On May 18, 2009, at 10:15 PM, Bright wrote: Hi ,this is my code,but the code can not limit the file to Audio file : - (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id NSDraggingInfo)info proposedRow:(int)row proposedDropOperation: (NSTableViewDropOperation)op { ? ? [tv