Re: Drag & Drop Launch
Re: Drag & Drop Launch
- Subject: Re: Drag & Drop Launch
- From: "I. Savant" <email@hidden>
- Date: Tue, 6 Dec 2005 16:28:43 -0500
Adding that the OS type for opening *any* file is **** (asterisk-
asterisk-asterisk-asterisk). There may be more to it but I'm not
entirely sure.
--
I.S.
On Dec 6, 2005, at 4:20 PM, John Pannell wrote:
Hi Kris-
I believe these are the steps I took; it was some time ago when I
did it. Note this is also for drops of folders only, although
document drops should follow a similar pattern. These instructions
are for XCode 2.2...
1. You must make your target aware of document types it can open.
Select your target from the groups & files pane, and get info. In
the properties tab, toward the bottom, you will see a list of
document types. For folders, you must add a line where the
properties are set as follows:
- OS Types = fold
- Store Type = Binary
- Role = Editor
- Package = checked
I would imagine you would add another line with info specific to
your app and document type to open dropped documents. NOTE: if you
are not seeing these options in the target inspector, you must
upgrade your target (this confused me for a long time)... choose
"Upgrade all targets in project to native" from the "Project" menu.
2. Your NSApp delegate must implement
- (BOOL)application:(NSApplication *)anApplication openFile:
(NSString *)aFileName
The string is the path to the dropped folder/document.
Hope this helps!
John
John Pannell
Positive Spin Media
http://www.positivespinmedia.com
On Dec 6, 2005, at 1:56 PM, email@hidden wrote:
Hi All,
After much searching on mailing lists, books, and other sources
I cannot find a straight forward answer to a very basic question.
How do I make my application accept Files or Folders dragged onto
its icon?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden