NSArchiver and tableView icons
NSArchiver and tableView icons
- Subject: NSArchiver and tableView icons
- From: Sam Thorne <email@hidden>
- Date: Sun, 25 Apr 2004 03:13:47 +0100
Hello List,
I'm having a bit of trouble getting my tableView to accept drag 'n'
dropped rows from another tableView.
All the drag and drop methods are called, but when it gets to the point
of unarchiving the object off the pasteboard, I get an error saying
-[NSImage stringByDeletingPathExtension]: selector not recognized.
It seems like the unarchiver is either struggling with the icons from
the first column of the drag source, or the one other image I have in
the app. The column icons themselves are contained within the app
resources. The only other image is an external file I've hard coded a
link to for testing purposes.
These are my NSCoder protocol methods:
-(void)encodeWithCoder:(NSCoder *)coder
{
[coder encodeObject:myType];
[coder encodeObject:name];
[coder encodeObject:myIcon];
[coder encodeObject:myPath];
[coder encodeObject:imagePreview];
[coder encodeObject:soundPreview];
[coder encodeObject:codeView];
}
-(id)initWithCoder:(NSCoder *)coder
{
if (self = [super init]){
[self setMyType:[coder decodeObject]];
[self setName:[coder decodeObject]];
[self setMyIcon:[coder decodeObject]];
[self setMyPath:[coder decodeObject]];
[self setImagePreview:[coder decodeObject]];
[self setSoundPreview:[coder decodeObject]];
[self setCodeView:[coder decodeObject]];
}
return self;
}
Any help much appreciated!
Thanks
--
Sam
So long, and thanks for all the fish.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.