so far, what i've determined by dumbing this down, is that I must be doing something inherently bad and nubi like here... the run time just completely implodes when it gets to the "NSData" line of code....
any help would be great,   thanks in advance.
the "BookMark" is just a class with the 3 items that you can see below in it, and then uses the @property and @synthesize routines to set the setter and getter, there is nothing else in the class. I suspect that NSData's keyedArchiver is not expecting a mutable thing? but NSUserDefaults only takes immutable things.

        NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
        BookMark *theBookMark = [[BookMark alloc] init];
        NSString *theurl = @"http:/wwww.anything.com/";

NSMutableDictionary *bookMarkList = [[NSMutableDictionary alloc] initWithCapacity: 9];

        bookMarkCount++;
        
        [theBookMark setBookMarkCount:bookMarkCount];
        [theBookMark setBookMarkurlString:theurl];
        [theBookMark setBookMarkTitle:[docTitle substringToIndex:100]];

NSString *countString = [NSString stringWithFormat:@"%d", bookMarkCount];

        [bookMarkList setObject:theBookMark forKey:countString];

NSData *bookMarkdata = [NSKeyedArchiver archivedDataWithRootObject:bookMarkList];

        [defaults setObject:bookMarkdata forKey:PECBookMarkListKey];

_______________________________________________

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