Re: [IBPalette] inspectorClassName returns (null)
Re: [IBPalette] inspectorClassName returns (null)
- Subject: Re: [IBPalette] inspectorClassName returns (null)
- From: Ricky Sharp <email@hidden>
- Date: Sat, 23 Sep 2006 14:19:11 -0500
On Sep 23, 2006, at 12:07 PM, Claudio Procida wrote:
I've created a simple palette for a custom view I've made. I can't
make the inspector palette appear, and I've found the reason.
The method inspectorClassName, defined as usual in a category of my
custom view class, always returns (null). I've double checked
everything.
Any suggestions?
Another IBPalette project created from scratch works fine.
This can happen if an exception is being thrown in your inspector's
revert: method.
Have you looked in the Console for messages? You may want to add
logging to your inspector's methods to help track down where things
are going wrong.
Something to look into is if your inspector's revert: method can
properly handle nil values coming from your object. When adding new
pointer-based attributes to your object, older archived objects will
return nil values for the new attribute's key.
To prevent this, you can do things like...
-(void)revert:(id)sender
{
NSColor* theColor = [[self object] someColorAttribute];
if (theColor == nil)
theColor = [NSColor blackColor]; // or whatever default
makes sense
[someColorWell setColor:theColor];
...
}
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden