Hey All,

I'm creating an IBPlugin for my framework and one of the last classes I'm 
wanting to add is an NSWindow subclass. I've added a library item to my library 
nib, I've set up the image view in it, I've added an NSWindow to my nib and 
changed the class and I've hooked up the library item's representedObject 
outlet to the NSWindow. So everything is set up just like every other object in 
my plugin.

The issue is, when I then try to drag the window out of the library, IB throws 
an exception because (supposedly) NSWindow doesn't support archiving. Even if I 
make it try to add a plain NSWindow it does the same. I'm not quite sure what 
is happening as the docs for NSWindow says it does implement NSCoding via 
NSResponder. Here is the full log if I try to drag my window out of the library 
and click continue on the error that pops up:

2010-06-20 17:16:53.616 Interface Builder[40543:a0f] Assertion Failure: NO
2010-06-20 17:16:53.616 Interface Builder[40543:a0f] File: 
/SourceCache/InterfaceBuilder/InterfaceBuilder-762/Application/IBApplication.m
2010-06-20 17:16:53.617 Interface Builder[40543:a0f] Line: 695
2010-06-20 17:16:53.775 Interface Builder[40543:a0f] Backtrace:
0   AppKit                           0x00007fff857b39d3 -[NSApplication run] + 
651
1   AppKit                           0x00007fff857ac5f8 NSApplicationMain + 364
2   Interface Builder                0x0000000100001305
3   Interface Builder                0x0000000100001294
4   ???

2010-06-20 17:16:53.776 Interface Builder[40543:a0f] Message: An uncaught 
exception was raised.

Exception Name: NSInvalidArgumentException
Reason: <NSWindow: 0x1285bb410> does not support archiving
User Info: (null)
2010-06-20 17:17:08.854 Interface Builder[40543:a0f] *** -[NSKeyedArchiver 
dealloc]: warning: NSKeyedArchiver deallocated without having had 
-finishEncoding called on it.

I've not got a clue what is causing it so if anyone has had any experience of 
this before I'd appreciate it.

Thanks

Martin_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to