• 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: Dragging broken symlinks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dragging broken symlinks


  • Subject: Re: Dragging broken symlinks
  • From: Ken Thomases <email@hidden>
  • Date: Sat, 9 Aug 2008 00:27:34 -0500

On Aug 8, 2008, at 11:26 PM, Gerriet M. Denkmann wrote:

I have an app which can open symlinks (not the thing the symlink points to). Done via
[ openPanel setResolvesAliases: NO ];


But when I drag a symlink to the icon of my app in the dock, - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
will have filename = content of symlink (or alias).
And in case of a broken symlink nothing happens at all.


How can I open broken symlinks by dragging?

There's a good chance that you can't. It may be that Launch Services, which is used by the Dock or the Finder to pass the open-document request to your application in response to your drag operation, has already resolved the symlink (or attempted to do so).


You could try installing a handler for the 'odoc' Apple Event to see if you can override Cocoa's handling. I don't know if the framework will let you do that.

You might have to build a Carbon application to test the possibility at a low level, with the Cocoa framework removed from the equation. If it's not possible there, it's almost certainly not possible in a Cocoa app. Using the DTSCarbonShell sample code as a starting point, it should be fairly easy to build such a test.

Cheers,
Ken
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Dragging broken symlinks
      • From: "Gerriet M. Denkmann" <email@hidden>
References: 
 >Dragging broken symlinks (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Dragging broken symlinks
  • Next by Date: NSArrayController's selectedIndexes
  • Previous by thread: Dragging broken symlinks
  • Next by thread: Re: Dragging broken symlinks
  • Index(es):
    • Date
    • Thread