Creating NSTableView programmatically

2017-12-11 Thread Eric Matecki
Hello, I'm trying to implement in Objective-C on macOS *programmatically* the "Real World Example" at the bottom of this page : https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/WhatAreBindings.html I want to do it programmatically instead of usi

Re: Creating NSTableView programmatically

2017-12-11 Thread Jonathan Mitchell
For NSTableCellView see https://developer.apple.com/documentation/appkit/nstablecellview objectValue is a property on NSTableCellView not on NStableView. The NSTableViewDelegate method - (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)

Re: Creating NSTableView programmatically

2017-12-11 Thread Eric Matecki
Thanks Jonathan, I got a lot further now. So it is NSTableCellView, not NSTableViewCell as stated in the doc ! I could have searched a long time before finding this out I made my own text field class according to this (in NSTableCellView's doc) : """ The objectValue is used when setting the

Re: Creating NSTableView programmatically

2017-12-11 Thread Alastair Houghton
On 11 Dec 2017, at 13:53, Eric Matecki wrote: > > Thanks Jonathan, > > I got a lot further now. > So it is NSTableCellView, not NSTableViewCell as stated in the doc ! FWIW, NSTableViewCell is the old way to do it, before view-based tables were the norm, which probably explains your confusion h

Re: Creating NSTableView programmatically

2017-12-11 Thread Quincey Morris
On Dec 11, 2017, at 10:19 , Alastair Houghton wrote: > > NSTableViewCell is the old way to do it, before view-based tables were the > norm In this case, I think “NSTableViewCell” is a typo in the documentation. In the following tables, it refers to the binding target as “Table Cell View”, not

Re: Creating NSTableView programmatically

2017-12-11 Thread Charles Srstka
> On Dec 11, 2017, at 4:59 AM, Eric Matecki wrote: > > > Hello, > > I'm trying to implement in Objective-C on macOS *programmatically* the "Real > World Example" at the bottom of this page : > https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/Wha