NSTableView ignores changes to cell's objectValue outside mouse tracking methods?
NSTableView ignores changes to cell's objectValue outside mouse tracking methods?
- Subject: NSTableView ignores changes to cell's objectValue outside mouse tracking methods?
- From: "Sean McBride" <email@hidden>
- Date: Fri, 26 Feb 2010 14:07:10 -0500
- Organization: Rogue Research Inc.
Hi all,
So for some days now I've been trying to make a custom NSActionCell that
works in an NSTableView that in turn uses Cocoa Bindings.
Starting from mmalc's ClockControl example, I now have it working for
simple cases.
Basically, I'm trying to implement a cell version of NSColorWell.
This works:
- (BOOL)startTrackingAt:(NSPoint)startPoint
inView:(NSView *)controlView
{
NSColor* colour = create random colour
[self setObjectValue:colour];
}
This doesn't:
- (BOOL)startTrackingAt:(NSPoint)startPoint
inView:(NSView *)controlView
{
NSColor* colour = create random colour
[self performSelector:@selector(setObjectValue:)
withObject:colour
afterDelay:0.0
}
There seems to be something 'special' about the various mouse tracking
methods. It seems that if I change my cell's objectValue outside of the
mouse tracking methods, that the TableView does not pay attention (and
does not update my model).
I want to change my cell's objectValue in response to an action from the
NSColorPicker.
Is there a way to 'poke' the tableview so that it notices such a change?
Thanks,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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