Problems with NSCell setObjectValue
Problems with NSCell setObjectValue
- Subject: Problems with NSCell setObjectValue
- From: Hrishikesh Murukkathampoondi <email@hidden>
- Date: Sat, 7 Aug 2010 22:46:21 +0530
Hi
I subclassed NSCell to return a custom cell value for a NSTableView. Within the function
- (NSCell *)tableView:(NSTableView *)tableView dataCellForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
I set the objectValue for the MyCell object (subclass of NSCell) using setObjectValue (I am passing it a NSString). After I set this I printed out the value [mycell objectValue] and also checked if this works [mycell hasValidObjectValue].
The value is printed correctly.
When MyCell's - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView method is called I print the objectValue and it is nil!!
When I try the same thing using setRepresentedObject it works fine.
What am I doing wrong when I use objectValue?
Thanks
Hrishi
_______________________________________________
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