I'm trying to be able to drag and drop files onto my application, but it's not working and I don't know what I have set wrong.
I created a regular Cocoa application and am now trying to add this feature and can't.
In IB, I open MainMenu.nib and connect the File Object to my controller that I want to be the delegate via the delegate outlet. Then, in my controller, I add code for the function applicationpenFile:. So, seems like everything should work, but when I build I can't drop files onto the icon.
Any ideas of what might be going on. I'm really hitting my head against the wall on this one and can't seem to figure it out. It's probably some minor detail I'm missing.
FYI, I've tried the following things (which probably seem silly in light of the right answer):
- Cleaning all targets and building from scratch
- putting [NSApp setDelegate: self] in init for my controller
- putting the method definition for applicationpenFile in my header file
Probably some other things I've forgotten playing with the build settings. Any ideas? Thanks
I created a regular Cocoa application and am now trying to add this feature and can't.
In IB, I open MainMenu.nib and connect the File Object to my controller that I want to be the delegate via the delegate outlet. Then, in my controller, I add code for the function applicationpenFile:. So, seems like everything should work, but when I build I can't drop files onto the icon.
Any ideas of what might be going on. I'm really hitting my head against the wall on this one and can't seem to figure it out. It's probably some minor detail I'm missing.
FYI, I've tried the following things (which probably seem silly in light of the right answer):
- Cleaning all targets and building from scratch
- putting [NSApp setDelegate: self] in init for my controller
- putting the method definition for applicationpenFile in my header file
Probably some other things I've forgotten playing with the build settings. Any ideas? Thanks