• 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
DO and NSImage...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DO and NSImage...


  • Subject: DO and NSImage...
  • From: Jiva DeVoe <email@hidden>
  • Date: Fri, 13 Jun 2003 00:59:03 -0700

I am using distributed objects to publish a custom class which has as a member, an NSImage. My custom class subscribes to the NSCoder protocol, and provides encode/decode methods like so:

@interface CustomClass: NSObject <NSCoding>
{
NSImage *_image;
}
-(id)initWithCoder:(NSCoder *)coder;
-(void)encodeWithCoder:(NSCoder *)coder;
@end

@implementation CustomClass
-(id)initWithCoder:(NSCoder *)coder
{
if(self = [super init])
{
_image = [[coder decodeObject] retain];
}
return self;
}
-(void)encodeWithCoder:(NSCoder *)coder
{
[coder encodeObject:_image];
}
@end

Anyway, everything works great, except, when I have the vended object on a *client* machine, and I try to do a cut and paste operation with it, I get the following error msgs:

*** -[NSArchiver connection]: selector not recognized

In my cut and paste code, I am using an NSArchiver to get an NSData to put on the pasteboard. Like so:

NSData *customData = [NSArchiver archivedDataWithRootObject:customObject];

What am I doing wrong??? If I take out the NSImage, everything works fine.

--
jiva at devoesquared.com
http://www.devoesquared.com
_______________________________________________
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: classNotFoundException NSPopUpList
  • Next by Date: Re: Apple Icons
  • Previous by thread: Re: classNotFoundException NSPopUpList
  • Next by thread: Can't get NSToolbar to work
  • Index(es):
    • Date
    • Thread