dropping files on apps

iconara

Registered
I want to be able to drop a file onto my cocoa-app and get a event telling me theUserDroppedAFileOrFolderOnThisApp:(id)sender

how?

theo
 
In your application delegate, override this method:
Code:
public boolean applicaiontOpenFile(NSApplication app, String fileName)
HTH,
F-bacher
 
I assume that in ObjC (as opposed to Java) that would be

-(BOOL) applicationOpenFile:(NSApplication *)file
fileName:(NSString *)filename

am I correct?
 
Looks right, but I'd check the NSApplication docs in the delegate section near the bottom to make sure.

F-bacher
 
Back
Top