 |
 |
Drag + Drop Input
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status:
Offline
|
|
Hello, a few questions:
1. Is there any way to take drag + drop input (specifically the kind where you drop an icon onto the application's icon to launch it with that file) in cocoa without using the document handler (or whatever that is called).
2. Is there any way to allow this behavior with folders? I can get it to accept files by telling the application that it accepts "*" file extensions, however, I can't seem to get it to allow folders to be dropped on it.
I tried to see if it passes the path of the file dropped as an argument but it does not.
Essentially I am trying to make something with "DropStuff"-like behavior.
Can anyone help?
Thanks,
Jeff.
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Mar 2000
Location: Ithaca, NY
Status:
Offline
|
|
Originally posted by Apocalypse:
<STRONG>Hello, a few questions:
1. Is there any way to take drag + drop input (specifically the kind where you drop an icon onto the application's icon to launch it with that file) in cocoa without using the document handler (or whatever that is called).
</STRONG>
In your application's delegate, implement the application :openFile: method.
<STRONG>
2. Is there any way to allow this behavior with folders? I can get it to accept files by telling the application that it accepts "*" file extensions, however, I can't seem to get it to allow folders to be dropped on it.
</STRONG>
Create a document type in Project Builder with an OS type of 'fold' (without the quotes).
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Mar 2000
Location: Ithaca, NY
Status:
Offline
|
|
Originally posted by Apocalypse:
<STRONG>Hello, a few questions:
1. Is there any way to take drag + drop input (specifically the kind where you drop an icon onto the application's icon to launch it with that file) in cocoa without using the document handler (or whatever that is called).
</STRONG>
In your application's delegate, implement the application :openFile: method.
<STRONG>
2. Is there any way to allow this behavior with folders? I can get it to accept files by telling the application that it accepts "*" file extensions, however, I can't seem to get it to allow folders to be dropped on it.
</STRONG>
Create a document type in Project Builder with an OS type of 'fold' (without the quotes).
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status:
Offline
|
|
Perfect!!!
Exactly what I was looking for.
Thanks,
Jeff.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
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
|
|
|
|
|
|
 |
 |
 |
 |
|
 |