The error comes back "file does not exist" and the NSLog statement shows "url = 
(null)" after I change the name of the file in the Finder.  If I change the 
file name back to what it was when the bookmark was saved the file opens fine.  
I changed my creation option to 0.  No difference.

NSData *bookmarkData = [note valueForKey:@"bookmarkData"];
                NSError *error = nil;
                BOOL isStale;
                NSURL *url = [NSURL URLByResolvingBookmarkData:bookmarkData 
options:0 relativeToURL:nil bookmarkDataIsStale:&isStale error:&error];
                NSLog(@"url = %@", [url description]);
                
                if (error != nil) {
                        [NSApp presentError:error];
                }


On Apr 18, 2010, at 11:45 AM, Noah Desch wrote:

> 
> On Apr 18, 2010, at 10:43 AM, Brad Stone wrote:
> 
>> I'm storing the bookmark data in an array displayed in a table:
>> NSData *bookmarkData = [inAbsoluteURL 
>> bookmarkDataWithOptions:NSURLBookmarkCreationSuitableForBookmarkFile 
>>                                                              
>> includingResourceValuesForKeys:nil
>>                                                              
>> relativeToURL:nil
>>                                                              error:&error];
> 
> 
> I am doing the same thing and it is still able to resolve the bookmarks when 
> the file moves or its name changes. The only real difference I can see 
> between our two approaches is that I am passing 0 for both the creation 
> options and the resolution options.
> 
> What are the properties of the error object are you getting when the bookmark 
> resolution fails?
> 
> -Noah
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/cocoa-dev%40softraph.com
> 
> This email sent to cocoa-...@softraph.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to