 |
 |
Drag & drop on app icon in Cocoa
|
 |
|
 |
|
Dedicated MacNNer
Join Date: May 2001
Location: Edinburgh, UK
Status:
Offline
|
|
How do I enable drag and drop of files on my app icon in Cocoa. I know there is probably some really simple way of doing this but I just can't see it. Any help would be appreciated.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jan 2001
Location: Sad King Billy's Monument on Hyperion
Status:
Offline
|
|
You can edit Info.plist inside the application package.
|
|
I abused my signature until she cried.
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
Scrod, what is the point of your signature? 
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status:
Offline
|
|
Scrod, is it possible that you could be a little more specific? Your response is sort of like telling a thirsty person to find water in a big bucket: sounds feasable, but where's this bucket and how does one get there?
I searched this forum and the omnigroup's osx-dev forums, and both have very sketchy responses on how to do this. I'd love to find documentation on it, wherever it exists...
Thanks,
F-bacher
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: May 2001
Location: Edinburgh, UK
Status:
Offline
|
|
Originally posted by Scrod:
<STRONG>You can edit Info.plist inside the application package.</STRONG>
I also want to know how to get the path of the file(s) that you dropped on it. Sorry if my message was a little unclear.
I have also had problems finding documentation on this - anything on drag & drop seems to be related to things like dropping pictures in windows and the like.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status:
Offline
|
|
Originally posted by iJed:
<STRONG>
I also want to know how to get the path of the file(s) that you dropped on it. Sorry if my message was a little unclear.
I have also had problems finding documentation on this - anything on drag & drop seems to be related to things like dropping pictures in windows and the like.</STRONG>
That part of the question is pretty simple. The method you use in ur apps delegate is as such:
public boolean applicationOpenFile(NSApplication theApplication, String filename)
Well, the Java version, atleast (the obj-c is the same, just all that crazy obj-c syntax  ) As you see, the filename gets passed into the method as a parameter. So there you go.
F-bacher
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: May 2001
Location: Edinburgh, UK
Status:
Offline
|
|
Originally posted by Ghoser777:
<STRONG>
That part of the question is pretty simple. The method you use in ur apps delegate is as such:
public boolean applicationOpenFile(NSApplication theApplication, String filename)
Well, the Java version, atleast (the obj-c is the same, just all that crazy obj-c syntax  ) As you see, the filename gets passed into the method as a parameter. So there you go.
F-bacher</STRONG>
- (BOOL)application  NSApplication *)theApplication openFile  NSString *)filename
I did this (in ObjC) and it works excellently! Thank you for your help on this. :-)
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Dec 2000
Status:
Offline
|
|
Originally posted by iJed:
<STRONG>
- (BOOL)application  NSApplication *)theApplication openFile  NSString *)filename
I did this (in ObjC) and it works excellently! Thank you for your help on this. :-)</STRONG>
Well, now I understand what the "Disable smilies" option is for...
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|