Re: How to exorcise a custom palette?
Re: How to exorcise a custom palette?
- Subject: Re: How to exorcise a custom palette?
- From: Jonathan Hess <email@hidden>
- Date: Wed, 9 Jul 2008 11:48:18 -0700
Hey Randall -
As you've discovered, IB 3.0 no longer uses the palettes from
Interface Builder 2.x. The error messages "*** -[NSKeyedUnarchiver
decodeObjectForKey:]: cannot decode object of class
(MyControlSubclass)" and "MyControlSubclass cannot be decoded" imply
that even though you removed one instance of the "MyControlSubclass"
subclass from the NIB, there must be another. The safest thing to do
here is to open the document again with IB 2.x, hunt down the
remaining MyControlSubclass instances, and remove them. You might have
to go back and forth between Interface Builder 2.x and 3.0 to ensure
that you've purged all of the instances of MyControlSubclass from your
file. In order to avoid rebooting, you could install the Xcode 2.5
tools on Leopard. They're available from http://developer.apple.com/tools/download/
.
Jon Hess
On Jul 9, 2008, at 9:57 AM, Randall Meadows wrote:
Responding to myself (since nobody else did!), with additional
information...perhaps I didn't give enough info the first time.
As I said, I have a nib file that uses a custom palette for one of
the views. This custom view is used only in this one place, so the
use of the palette was overkill, and now that they are no longer
supported, it is a great PITA. I have deleted the widget, replaced
it with a standard CustomView (heh), rewired the connections, set
the class to the appropriate subclass, and things work just peachy.
But I cannot make the nib file understand that it no longer needs
the custom palette. After making the aforementioned changes (and on
a whim, I tried NOT setting the class of the widget to the
appropriate subclass, I simply left it as the standard view class--
NSView) and deleting the palette from /Developer/Palettes/, when I
re-open the nib file (in Tiger with IB 2.5.4), I get this error
message:
"While opening "DocumentWindow.nib", the following error occured
[sic]:
*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object
of class (MyControlSubclass)"
(I actually get this error message twice in a row opening a single
file.)
On Leopard, even though there is a /Developer/Palettes/ directory,
and even though my custom palette is in there, IB 3.x complains that
it cannot be opened because an instance of MyControlSubclass cannot
be decoded. Ensure all plug-ins used to created this document have
been loaded". Which is as I expected, but the directory name "/
Developer/Palettes" gave me a faint glimmer of hope.
I really would like to be able to open this file with having to
reboot into Tiger and run IB 2 to do it. As a last resort, I s'pose
I could recreate the entire nib file, but that would be non-trivial,
tedious, and extremely fraught with peril. Surely there has to be a
better way to exorcise this palette from the nib file.
Pretty please? :)
randy
On Jul 8, 2008, at 3:34 PM, Randall Meadows wrote:
So I have this nib file from the Xcode 2.4/Interface Builder 2.5
days. My predecessor thought it would be a good idea to write an
IB palette for this view, which is used in exactly one place. Now
that IB palettes are obsolete, I now have to fix things.
I want to completely remove all traces of this palette, and simply
use the source for this view. I've opened the nib file in IB 2.5,
deleted the view that was created from the custom palette, created
a new view in its place and assigned it the appropriate subclass,
and rewired the connections. After having done that, I still
cannot open the nib file unless IB can find that custom palette.
Needless to say, this is going to be a problem moving forward to
Leopard and Xcode/IB 3.x.
What do I need do to rectify the situation?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden