• 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: How do you get an NSCell subclass into a Palette?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you get an NSCell subclass into a Palette?


  • Subject: Re: How do you get an NSCell subclass into a Palette?
  • From: Ricky Sharp <email@hidden>
  • Date: Thu, 31 May 2007 15:34:06 -0500


On May 31, 2007, at 2:57 PM, Jerry Krinock wrote:

In Interface Builder, the "Data" palette contains several items that are subclasses of NSActionCell: NSSliderCell, NSStepperCell, NSTextFieldCell, etc. I want to build a Palette which contains an NSActionCell subclass like that.

In my Palette project, I have a window, the "Palette View" into which my palette items need to be instantiated.

To instantiate a subclass of NSView, I drag in the "Custom View" and subclass it.

But how do I instantiate a subclass of NSActionCell? There is no generic "NSActionCell" in any of the palettes to drag in, and the "Instantiate..." menu item is always disabled.

I looked through all the Interface Builder - Palette examples I could find, but none of them do any cells, only views. How did they do that?

Look again at /Developer/Examples/InterfaceBuilder/BusyPalette/

Specifically, look in BusyPalette.m for handling of the custom BPCellPboardType pasteboard type.

The item on the palette window that you'll drag will still be a view (cells can only render themselves when inside a view). The custom pasteboard type above is used to establish acceptable drop-targets as well as handling when pastes actually occur (basically grab the cell in the dragged view and assign that cell to the drop-target object)

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >How do you get an NSCell subclass into a Palette? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: How do you get an NSCell subclass into a Palette?
  • Next by Date: Re: String Contains String
  • Previous by thread: How do you get an NSCell subclass into a Palette?
  • Next by thread: NSObject -poseAs:
  • Index(es):
    • Date
    • Thread