• 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
Re: [IBPalette] inspectorClassName returns (null)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >[IBPalette] inspectorClassName returns (null) (From: Claudio Procida <email@hidden>)

  • Prev by Date: Scrolling NSOutlineView makes attributed string bold
  • Next by Date: Making a window transparent to some events, but not others
  • Previous by thread: [IBPalette] inspectorClassName returns (null)
  • Next by thread: Re: [IBPalette] inspectorClassName returns (null)
  • Index(es):
    • Date
    • Thread