• 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
Re: NSTableViews with NSSliderCells
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableViews with NSSliderCells


  • Subject: Re: NSTableViews with NSSliderCells
  • From: Corbin Dunn <email@hidden>
  • Date: Wed, 5 Apr 2006 16:57:39 -0700


On Apr 4, 2006, at 7:47 AM, Jeffrey Johnson wrote:

Hello,

I'm bringing an old application to Cocoa with a UI I have to duplicate
(exactly), and I'm trying to set up a three column NSTableView where
column 3 of the NSTableColumns is an NSSliderCell. When the slider is
dragged, column 2 needs to display the current value of the slider (a
double).

 I've setup a tableView:objectValueForTableColumn:row method and the
action method for the slider cell.

I have a few questions about using the slider cell-

1) To get the column 2 cell to display the value from the slider in
column 3, I'm getting the doubleValue: from the slider, pushing it to my
data source, then calling reloadData on the table in the slider's action
method. This seems to work, but it seems a waste to reload the whole
table for one cell- is there a way to target and update a single cell?
Since one of the cells reloadData potenially updates is the slider I'm
movibng, are there things I need to consider?

You should use: [table setNeedsDisplayInRect:[table frameOfCellAtColumn:col row:row]];


2) I need to do certain things when the slider starts and stops tracking
(besides what happens in the action method) and I haven't found a way to
trap these events for the NSSliderCell in a NSTableView, like I would
with mouseUp and mouseDown if I was working with an NSSlider control.

Your best bet probably is to subclass NSSliderCell and do it there when tracking starts and stops


--corbin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSTableViews with NSSliderCells
      • From: Jeffrey Johnson <email@hidden>
References: 
 >NSTableViews with NSSliderCells (From: Jeffrey Johnson <email@hidden>)

  • Prev by Date: Re: LSUIElement 1 still in Dock?!?
  • Next by Date: Re: LSUIElement 1 still in Dock?!?
  • Previous by thread: NSTableViews with NSSliderCells
  • Next by thread: Re: NSTableViews with NSSliderCells
  • Index(es):
    • Date
    • Thread