I meant like if it was a common case. Nevermind though, here is the code:

Archiving:
NSMutableDictionary *defaultValues = [NSMutableDictionary dictionary];
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"/ Users/jacobschwartz/Pictures/wallpapers"]];
NSData *pathAsData = [NSKeyedArchiver archivedDataWithRootObject:url];
[defaultValues setObject:pathAsData forKey:JHSPathKey];
[[NSUserDefaults standardUserDefaults] registerDefaults:defaultValues];


Unarchiving:
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSData *pathAsData = [defaults objectForKey:JHSPathKey];
return [NSKeyedUnarchiver unarchiveObjectWithData:pathAsData];

And then I call:
[textField setStringValue:[[self pathName] absoluteString]]
(pathName is the unarchiving method)

And gdb gives me this error:
2009-10-01 17:18:25.391 SyncBackground[452:a0f] -[NSButton absoluteString]: unrecognized selector sent to instance 0x10013a7b0

Thank you again.
-Jake

On Oct 1, 2009, at 3:51 PM, I. Savant wrote:

On Oct 1, 2009, at 3:49 PM, Jacob Schwartz wrote:

I didn't post it right away in case this was a common mistake

That's the problem. If you think about it, how can we know what kind of mistake it was without seeing what you actually did? :-)

--
I.S.





_______________________________________________

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