• 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: Subclassing NSButton, and IB palettes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclassing NSButton, and IB palettes


  • Subject: Re: Subclassing NSButton, and IB palettes
  • From: James DiPalma <email@hidden>
  • Date: Sun, 14 Jul 2002 10:17:18 -0400

On Wednesday, July 10, 2002, at 04:36 PM, Simon Fraser wrote:
However, it seems IB doesn't make it easy to create UI for
appending data to existing classes; I can make an IB palette
for MyPrefsButton, but, even through it inherits from NSButton,
IB just shows my panel, and doesn't seem to have a way to
show the existing NSButton panel. Do I really have to implement
panel UI to set all of the properties of the superclass?

Look at IBInspectorManager.h (inside InterfaceBuilder.framework) for these:

+ (IBInspectorManager *)sharedInspectorManager;
- (void)addInspectorModeWithIdentifier:(NSString *)identifier
forObject:(id)object localizedLabel:(NSString *)label
inspectorClassName:(NSString *)inspectorClassName
ordering:(float)ordering;
IB_EXTERN NSString * const IBWillInspectObjectNotification;

Listen for IBWillInspectObjectNotification and use [super inspectorClassName] for inspectorClassName. Then NSButton's attributes inspector will be added to your object's list of inspectors. If you want NSButton's inspector to be your attributes inspector, then use your object's new attributes inspector class as inspectorClassName and don't override inspectorClassName.

Hope that helps.


-jim
_______________________________________________
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.

References: 
 >Subclassing NSButton, and IB palettes (From: email@hidden (Simon Fraser))

  • Prev by Date: [OT] Reliability of April Beta Developertools
  • Next by Date: Re: Weird problem with documents
  • Previous by thread: Subclassing NSButton, and IB palettes
  • Next by thread: FSSpec from NSSavePanel
  • Index(es):
    • Date
    • Thread