Re: Setting a subclass of NSButtonCell in code
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