• 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: Safari bookmarks...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Safari bookmarks...


  • Subject: Re: Safari bookmarks...
  • From: Jerry Krinock <email@hidden>
  • Date: Sat, 9 Feb 2008 07:25:47 -0800

On 6 Feb 2008, at 12:23, Amit8 J wrote:

I need a bit of help. I am working on an application where I need to
catch dragged and dropped bookmarks from safari.

Is there some way I can get the URLs of all the dragged and dropped
bookmarks. Any help would be appreciated.

Sorry I missed your message when you first posted it. It is not documented, but quite obvious and easy to do. Just accept and get the pboard type @"BookmarkDictionaryListPboardType".


<snip>
NSString* const SafariBookmarkItemPboardType = @"BookmarkDictionaryListPboardType" ;
</snip>
<snip>
else if([pboard availableTypeFromArray:[NSArray arrayWithObjects:SafariBookmarkItemPboardType, nil]]) {
NSArray *safariItems = [pboard propertyListForType:SafariBookmarkItemPboardType] ;
</snip>


The array safariItems is an array of NSDictionaries. Each NSDictionary is the root of a tree of dropped items. Traverse the "Children" key recursively to get all the children.

On Feb 6, 2008 3:27 PM, Citizen <email@hidden> wrote:

For Internet Location files dragged from finder you can use
"NSFilenamesPboardType" to get the files, then you can scan each file
for the URL. You have to use Carbon to look in the files resource fork
data for the URL though.

Indeed, I've done this too and it was much more painful.

_______________________________________________

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


References: 
 >Safari bookmarks... (From: Amit8 J <email@hidden>)
 >Re: Safari bookmarks... (From: Citizen <email@hidden>)
 >Re: Safari bookmarks... (From: "arri mafkees" <email@hidden>)

  • Prev by Date: Graphing data from NSArrayController
  • Next by Date: Re: help with closing file handle
  • Previous by thread: Re: Safari bookmarks...
  • Next by thread: NSOutlineView column with checkbox+image+text
  • Index(es):
    • Date
    • Thread