0

Is it possible for a NSSliderCell to work in "continuous" mode when inside a cell-based NSTableView? I've searched here on S.O. and also googled the question without seeing anything directly relevant.

In Interface Builder I have checked the "continuous' properties for both the Slidercell and the TableView, but I cannot get the slider to send out continuous messages.

I have no problem using NSSlider controls in continuous mode elsewhere in my application, and the Slidercell/Tableview in question here works fine as is, but updates only when the mouse is released.

Is it necessary to use a View-based Tableview to get this behaviour? I would rather not do that because it means a messy rewrite of the code for several other tableviews as well.

(edit) The below code is in VFX Forth, using their provided Cocoa bridge. The relevant portion in tableView:setObjectValue:forTableColumn:row: is :

" BPAd" theid$ @isEqualToString: ?of objectid @floatValue phr# paraatom# PHRASE.ATOM#>A +atomExtra 04 + SF! endof

" BPad" is the identifier for the column containing the slider cell.
'The next line just takes the floatValue from the slider and stores in into my data-structure. The above all works exactly as expected, but ONLY on release of the mouse-button. It does not act continuously.

thanks in advance for any insight

bgdegazio
  • 19
  • 5
  • Hi bgdegazio, ist your table view a dynamic or a static table view? – MacUserT May 01 '20 at 14:25
  • Yes, `NSSliderCell` can work in "continuous" mode when inside a cell-based `NSTableView`. Post a [mre] please. – Willeke May 01 '20 at 14:34
  • MacUserT -- the TableView in question is dynamic. It uses a data source object to dynamically update its cells. – bgdegazio May 03 '20 at 17:58
  • Willeke - Thanks for the assurance that NSSliderCell can work in continuous mode. – bgdegazio May 03 '20 at 19:37
  • By the way cell-based NSTableView is outdated for many, many years. – vadian May 03 '20 at 19:55
  • See [continuous](https://developer.apple.com/documentation/appkit/nscontrol/1428952-continuous?language=occ). "A Boolean value indicating whether the cell sends its action message continuously during mouse tracking.". Connect the slider to an action method. – Willeke May 06 '20 at 22:15

0 Answers0