I’m looking for a way to delete all rows of a table view (I can’t even find how to delete one row)…
I’m thinking of an equivalent of the AplleScript Studio command below.
set contents of table view "TableView" of scroll view "ScrollView" of window "main" to {}
Maybe if someone know how to delete one row, I can delete them all in a repeat loop or something like that?
What Richard is asking is whether you set up your dataSource using the table view delegate methods or bindings.
If you are using an NSMutableArray, which is what I am assuming:
dataSource's removeAllObjects()
or the AppleScript equivalent {}
set dataSource to {}
To remove individual rows, you need to get the row number and then remove it from the dataSource.
Look under NSMutableArray in the documentation to see the methods.