Re: Custom tableView cell by subclassing NSCell
Re: Custom tableView cell by subclassing NSCell
- Subject: Re: Custom tableView cell by subclassing NSCell
- From: Joar Wingfors <email@hidden>
- Date: Tue, 5 May 2009 18:23:00 -0700
On 5 maj 2009, at 17.41, Malayil George wrote:
The modification that I have made is that in my subclass of NSCell
A couple of points:
* NSCell already have an image property. Why are you adding an
additional image property? If you're adding an additional image
property, you should give it - and its backing ivar - distinct names.
* When creating a custom cell to use in table views you need to
implement proper support for the NSCopying protocol:
<http://developer.apple.com/documentation/Cocoa/Conceptual/ControlCell/Tasks/SubclassingNSCell.html
>
<http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmImplementCopy.html
>
This is a bit tricky for NSCell, since it implements copy using
NSCopyObject. The referenced documentation should provide you with the
info you need though.
j o a r
_______________________________________________
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