• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSArchiver and tableView icons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: Re: Programmatically creating NSButton
  • Next by Date: ANN: OCSmart Hacks beta 1
  • Previous by thread: Re: Setting message color in Mail programatically?
  • Next by thread: ANN: OCSmart Hacks beta 1
  • Index(es):
    • Date
    • Thread