For my application I could really need a custom View inside a TableView. The default Cell view isn’t working for me anymore. I’m searching and reading a lot about how to get your own custom NSView within a tableview but can’t really find a answer that I could easily translate to ObjC.
Is there some tutorial?
My first question is can this be done with bindings?
I did find swift ways where one would use a datasource with the method tableView_viewForTableColumn_row_
In this method they’re setting a text field without bindings and I’m scratching my head how to do that with applescriptObjC.
And especially the part
result.imageView.image = item.itemIcon;
result.textField.stringValue = item.itemDisplayName;
How does that translate into ASOC?
Also how does ASOC know what objects are in the cell view?
If you want to work with bindings you won’t need this (and the other) delegate function as mentioned in part 2. (See link at the end)
But to answer;
--avoid result and item as words cause they are reserved or use | bars to escape
theResult's imageView's setImage:(theItem's itemIcon())
theResult's textField's setStringValue:(theItem's displayName())