List vs record an array conroller

(Andreas Kiel) #1

After years I try to port an old ASS app to AsObjC.

While I’ve the usual trouble of beginners the most uncomfortable thing for me at the moment is transport the code for ASKDataSource to arrayControllers.
With the old code the data source of the ASKDataSource was called during awake from nib

set colNameList to {“aa”, …, “zz”}
tell dataSource
repeat with i from 1 to (count of colNameList)
make new data column at the end of data columns with properties {name: (item i of colNameList) as string}

the matching table was called just to have reference to a property

data source and table were connected in IB

the table in IB had X columns out of the (count of colNameList), these had the matching identifiers.

In the actual process the needed values were created and added to a list.
This list (or better list of lists) was appended to the data source.
The table was populated.

While appending the list to the data source every single list was converted to a record.

That seems not to be possible anymore?
Any idea is appreciated.

(Shane Stanley) #2

You need to create your data as a list of records, stored in a property, and bind that as the content array of the array controller in IB.

(Andreas Kiel) #3

Thanks Shane.

I feared that I’ve to that :wink: