One Quickie


Simple unarchiving (NSCoder->General)
To unarchive a single object (which can be something like an array or dictionary that contains other object), such as loading your document, do:
- (BOOL) loadDataRepresentation: (NSData *) data
                         ofType: (NSString *) aType
{
    // replace the moedl
    [group release];
    group = [NSUnarchiver unarchiveObjectWithData: data];
    [group retain];

    // make any associations to hook the new data into your document

    return (YES);

} // loadDataRepresentation



borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book

webmonster@borkware.com