Re: Custom tableView cell by subclassing NSCell
Re: Custom tableView cell by subclassing NSCell
- Subject: Re: Custom tableView cell by subclassing NSCell
- From: Malayil George <email@hidden>
- Date: Wed, 6 May 2009 18:50:55 -0400
Thanks Joar. Turns out you were right...it wasn't really because of the
retain/copy semantics in my property declaration. Changing the variable name
to myImage and the setter/getters accordingly has taken care of the issue
and it works fine.
George
On Tue, May 5, 2009 at 9:23 PM, Joar Wingfors <email@hidden> wrote:
>
> 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