Hello, Im creating a table view scroll view thingy. And when I go to run my program, I am getting this error. “Can’t get every data row of null. (-1728)”
Im going to past my code, I hope someone can help me. Im sure its obvious, Im just a rookie at this.
property theDataSource : null
on clicked theObject
set theItem to make new data row at end of every data row of theDataSource
getContactInfo(window of theObject, theRow)
set myData to {{"item1", "item2", "item3", "item4", "item5", "item6", "item7"}, {"empty"}}
end clicked
on will open theObject
set theDataSource to data source of table view "Data" of scroll view "DataBox" of window of theObject
tell theDataSource
make new data column at the end of the data columns with properties {name:"Name"}
make new data column at the end of the data columns with properties {name:"Page"}
make new data column at the end of the data columns with properties {name:"Bounds"}
make new data column at the end of the data columns with properties {name:"Scale"}
make new data column at the end of the data columns with properties {name:"Horizontal Scale"}
make new data column at the end of the data columns with properties {name:"Vertical Scale"}
make new data column at the end of the data columns with properties {name:"File Path"}
end tell
end will open
on getContactInfo(theWindow, theRow)
tell theWindow
set contents of data cell "Name" of theRow to item 2 of item 1 of myData
set contents of data cell "Page" of theRow to item 3 of item 1 of myData
set contents of data cell "Bounds" of theRow to item 7 of item 1 of myData
set contents of data cell "Scale" of theRow to item 6 of item 1 of myData
set contents of data cell "Horizontal Scale" of theRow to item 4 of item 1 of myData
set contents of data cell "Vertical Scale" of theRow to item 5 of item 1 of myData
set contents of data cell "File Path" of theRow to item 1 of item 1 of myData
end tell
end getContactInfo
on clearData()
set theTableView to table view "Data" of scroll view "DataBox" of window "theWindow"
set theDataSource to data source of theTableView
delete every data row of theDataSource
set data source of theTableView to theDataSource
end clearData
Model: Mac G4
Browser: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041217
Operating System: Mac OS X (10.3.8)