I'm not too familiar with the Cocoascript side of things, but is the delegate instance you created being retained? The
dataSource properties are weak references so simply setting the properties to the delegate will not retain the instance you created. I'm assuming that you should set
COScript.currentCOScript().setShouldKeepAround_(true) at the start of the execution?
For the absolute bare necessities to get this working, all you need to implement are
NSTableViewDataSource & the
NSTableViewDelegate is for the additional customization of each cell (or in layman terms, each item in the list). That requires creating not just a
NSTableCellView, but the
NSTextField for the text and other subviews. The
...objectValue... delegate method automatically creates a
NSTableCellView with a text field that is filled in with the string you return in that method.
Also make sure to remove the
setFlipped: method on
NSScrollView at the end. The flipped is a read-only property that can only be set to true by subclassing
NSScrollView (which I have no idea how to do in Cocoascript).
If you need more help, feel free to also Twitter DM me @uiplusux.