Re: NSArchiverArchiveInconsistency ???
Re: NSArchiverArchiveInconsistency ???
- Subject: Re: NSArchiverArchiveInconsistency ???
- From: Ryan Bates <email@hidden>
- Date: Wed, 18 Feb 2004 14:13:23 -0800
There are some answers in the archives. Notably:
<
http://cocoa.mamasam.com/COCOADEV/2002/12/1/51235.php>
To sum it up, you need to make it a framework and link it to your
application. Check out the busy palette example at:
/Developer/Examples/InterfaceBuilder/BusyPalette
Ryan
On Feb 18, 2004, at 1:33 PM, Giovanni Donelli wrote:
Hello Gurus,
I've been hitting on this problem for whole the day so I decided to
write you,
I sub-classed the NSTextField and I because I wanted to make it a
IBPalette added the method in order to support <NSCoding>
now when I run my application I get:
2004-02-18 21:56:42.688 FrameworkDebug[6831] An uncaught exception was
raised
2004-02-18 21:56:42.717 FrameworkDebug[6831] *** Incorrect archive:
unexpected byte
2004-02-18 21:56:42.728 FrameworkDebug[6831] *** Uncaught exception:
<NSArchiverArchiveInconsistency> *** Incorrect archive: unexpected
byte
but I really can't see where the problem is since these are the 2
methods:
-------------------------
- (void)encodeWithCoder:(NSCoder *)coder
{
[super encodeWithCoder:coder];
[coder
encodeValueOfObjCType:@encode(typeof(underlineWhenMouseIsOver))
at:&underlineWhenMouseIsOver];
}
- (id)initWithCoder:(NSCoder *)decoder
{
if ( self = [super initWithCoder:decoder] ) {
[decoder
decodeValueOfObjCType:@encode(typeof(underlineWhenMouseIsOver))
at:&underlineWhenMouseIsOver];
}
return self;
}
-------------------------
which are very basic! I can't really see where the problem is.
anyone had the same issue? any advice?
Thank you for your help!
Giovanni Donelli
_______________________________________________
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.
_______________________________________________
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.