I have a table that's using bindings to get table data. I'm also using willDisplayCell to customize the specific cell when it's being displayed. My question is, how do I get the value of the cell that's being referred-to in the willDisplayCell method? I don't want to query the controller object, since I'm using bindings and not a dataSource. Is there something in the NSTableColumn or NSTableView that I have to call to get the value?
Getting object info in willDisplayCell when NSTableView is using bindings
601 views Asked by AWF4vk At
1
There are 1 answers
Related Questions in COCOA
- In what context can we use an unqualified #selector() expression in Swift?
- How can I trigger macOS system gamepad API based on a value received from iOS app through core bluetooth
- Using sort descriptors in Outline View
- NSTableView to NSOutlineView Drag & Drop not accepting drop
- How to remove horizontal line in bottom of section NSTableView?
- CGSRegionRef: How is an arbitrary region represented as union of rects?
- Listen for Touch Events on MacOS (Trackpad)
- Window "yanks" when moving
- Writing NSFilePromiseProviders to pasteboard blocks app on quit
- Basic ImGui program doesn't render, leaks memory and crashes
- NSTokenField suggestion using context menu in swift
- How to link multiple text views to a single text storage in TextKit 2
- I would like to know why I’m not getting IBOutlets connected in an App’s window
- How to make a custom event loop in Cocoa?
- Why is restoreWindow(withIdentifier:state:) called after applicationDidFinishLaunching(_:)?
Related Questions in BINDING
- x:Bind a embeded page to the parent window viewmodel in WinUI 3
- ERR_EMPTY_RESPONSE with docker container port bind
- Angular: Two way binding and Event binding not working
- Cannot find protocol declaration for 'TransactionHandlerDelegate'" (Swift/MAUI Interop)
- How to make Two Header Rows for table in UI5
- Synchronize a bindable property with a command
- RStudio throws continuous "Error: bad binding access " errors and has to be killed
- wpf bind all sliders ‘ IsEnabledProperty in a array
- WPF TextBox set common StringFormat for all controls
- How to bind using BindingReducer to subset of the childstate using tca
- Is there a way to bind a Function to a Tabview change in CustomTkinter?
- Bindings not found
- WPF property declared in C# code instead of XAML
- How can I create a framewrok from a native iOS library?
- How to bind the other "Enter" on the keyboard in python tkinter?
Related Questions in NSTABLEVIEW
- How to create a table cell view like this similar to native not app notification view
- NSTableView to NSOutlineView Drag & Drop not accepting drop
- How to remove horizontal line in bottom of section NSTableView?
- Identify modified row for NSTableView bound with NSArrayController
- NSTableView.reloadData(forRowIndexes:columnIndexes:) causes wrong subview layout when usesAutomaticRowHeights = true
- Calculate/Display NSTableView column sum
- NSTableView is unresponsive when presented in NSApp.runModal(for:)
- NSTableView hangs when scrolled down in fullscreen mode
- NSTableView cell value may remain with invalid value after validateValue(_:forKey:) failed. How to prevent this?
- How do I vertically align text in a custom table
- Unable to remove left & right borders on NSTableview in an NSScrollView
- NSTableView multi-column drag reorder rows and include all columns
- Using Swift, how can I get the x-coordinate of an NSTableColumn while it is being dragged
- How can I update the datasource presented in a programmatically created NSTableView
- NSTableView does not show last column
Related Questions in NSTABLECOLUMN
- Getting checkboxes to reflect their state in an NSTableColumn
- Custom NSCell in NStableColumn and Cocoa Bindings?
- Programmatically adding columns (with bindings) to a view-based NSTableView?
- Custom NSTableViewCell is not aligned when is displayed in the NSTableView
- NSTableColumn identifier is "_NS:9"
- NSTableColumn animation
- nstableview + cannot show partial file names
- How to display sort indicator in the table header?
- Adding NSTableView to NSView Programmatically
- NSArrayController populates NSTableView but doesn't set the cell title
- How to add columns in Cocoa NSTableView?
- Span NSTableVIew Header for multiple columns
- NSTableView column editing with auto refresh of table
- Getting object info in willDisplayCell when NSTableView is using bindings
- JTable - why doesn't it keep the TableColumns after adding a row?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
There's nothing wrong with mixing the data source and bindings approaches. In fact, the documentation mentions the two can be mixed for greater control in complicated situations. It's done all the time, so don't think you're doing something wrong.
Also, point of order: the
-tableView:willDisplayCell:forTableColumn:row:method is part of theNSTableViewDelegateprotcol, not theNSTableViewDataSourceprotocol, so it's even less "dirty" than you think. :-)The correct way in this situation is to create an outlet to your array controller (so you can message it) and ask it for the object in its
-arrangedObjectswhose index matches the requested row. Any other way and you're fighting the framework.