• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa applications as "droplets"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa applications as "droplets"


  • Subject: Re: Cocoa applications as "droplets"
  • From: Public Look <email@hidden>
  • Date: Mon, 24 Nov 2003 22:48:36 -0500

There is no problem using folders as documents. That is what .rtfd, and .nib, and .xcode "files" are. They are actually directories masquerading as individual files. I think you can also setup an application to accept any file or folder dropped on its icon.

Cocoa applications don't have to be running for you to drop files on their icons. They will start up as needed automatically.

I am glad all of your problems are solved ;)


On Nov 24, 2003, at 10:20 PM, Sean Gilbertson wrote:

All the suggested methods are valuable and valid -- thanks! However, one piece (or two) of the puzzle is missing; what I'm really after is the ability to drop files and folders on the app's icon (you can associate apps with document types, but what about directories?), without the app having to be already running. If I could associate folders with a Cocoa-document application, that would solve all my issues (I think).

Thanks,
Sean


On Nov 24, 2003, at 9:40 AM, Scott Anguish wrote:

while that is one way... it's also possible to just use the NSApplication delegate methods that will open a dropped file

 application:openFile:

 application:openFiles:

 application:openFileWithoutUI:

<http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSApplication.html#//apple_ref/ occ/cl/NSApplication>

That really is the better way. You'll get a message for each dropped file (or a message for the dropped files)


On Nov 24, 2003, at 9:56 AM, Stiphane Sudre wrote:

As written in the list archives.

NSArray *myArgs = [[NSProcessInfo processInfo] arguments];

Maybe it will help.

On Monday, November 24, 2003, at 03:25 PM, Sean Gilbertson wrote:

All,

I like the ability of applescripts to capture launch arguments so easily, especially with the semantics of a drag-and-drop application. Obviously, a C application comes with argc and argv, so I'm wondering if Cocoa provides any useful facilities for doing this -- perhaps something similar to an NSApplicationDidFinishLaunchingNotification, with useful "userInfo."
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Cocoa applications as "droplets" (From: Stéphane Sudre <email@hidden>)
 >Re: Cocoa applications as "droplets" (From: Scott Anguish <email@hidden>)
 >Re: Cocoa applications as "droplets" (From: Sean Gilbertson <email@hidden>)

  • Prev by Date: Re: Stupid question: Flood Fill
  • Next by Date: Re: Usage of NSSortDescriptor
  • Previous by thread: Re: Cocoa applications as "droplets"
  • Next by thread: Debugging not working in Xcode 1.0.1
  • Index(es):
    • Date
    • Thread