• 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: Setting a subclass of NSButtonCell in code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting a subclass of NSButtonCell in code


  • Subject: Re: Setting a subclass of NSButtonCell in code
  • From: Graham Cox <email@hidden>
  • Date: Thu, 15 Apr 2010 20:25:23 +1000

On 15/04/2010, at 7:14 PM, Arun wrote:

> Instead of setting it in the IB, is it possible to set the class in the code
> itself? if yes how can we do this.


If you meant how to make objects of the subclass, just, y'know, create them:

cell = [[MyCellClass alloc] init(...)];

Then set the control or other cell-hosting object using -setCell: or -setDataCell: as mentioned.

There is no way to "set the class in the code" once an object has been made - its identity is established when it is allocated.

--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: 
 >Setting a subclass of NSButtonCell in code (From: Arun <email@hidden>)

  • Prev by Date: Re: Setting a subclass of NSButtonCell in code
  • Next by Date: Display AppleScript dictionary browser
  • Previous by thread: Re: Setting a subclass of NSButtonCell in code
  • Next by thread: Re: Setting a subclass of NSButtonCell in code
  • Index(es):
    • Date
    • Thread