• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTableView ignores changes to cell's objectValue outside mouse tracking methods?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSTableView ignores changes to cell's objectValue outside mouse tracking methods?
      • From: Corbin Dunn <email@hidden>
    • Re: NSTableView ignores changes to cell's objectValue outside mouse tracking methods?
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Is there any Cocoa API (or other way) to determine if an application is running in a VNC or ARD session?
  • Next by Date: Re: High Level Toolkit -- is it obsolete or not?
  • Previous by thread: Re: Is there any Cocoa API (or other way) to determine if an application is running in a VNC or ARD session?
  • Next by thread: Re: NSTableView ignores changes to cell's objectValue outside mouse tracking methods?
  • Index(es):
    • Date
    • Thread