Hi,
I’m going now to Xcode 4.1 to transfer my project and come into troubles.
At first, I can’t fill in my tables from data sources.
Here are my appropriate script parts:
on awakeFromNib()
set kDataSource to NSMutableArray's alloc()'s init()
.....
end
on tableView_objectValueForTableColumn_row_(aTableView, aColumn, aRow)
if aTableView is kTableView then
if kDataSource's |count|() is equal to 0 then return end
set columnIdent to aColumn's identifier
set theRecord to kDataSource's objectAtIndex_(aRow)
-- log theRecord
set theColumnValue to theRecord's objectForKey_(columnIdent)
--log theColumnValue
return theColumnValue
...
end
later on...
....
try
set theContents to the clipboard as text
end try
set oldTextItemDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to return
set theCount to (count text items of theContents)
if last text item of theContents is "" then
set theCount to theCount - 1
end if
repeat with i from 1 to theCount
set NewData to {derName:(text item i of theContents) as text, s1:"", s2:"", s3:"", s4:"", s5:"", s6:"", s7:"", s8:"", summe:0 as integer, prozent:0 as integer, dieNote:""}
kDataSource's addObject_(NewData)
end repeat
log kDataSource -- OK
kTableView's reloadData() -- crash
errmess:
[MyDocument tableView:objectValueForTableColumn:row:]: Einige Daten können nicht in den erwarteten Typ umgewandelt werden. (error -1700) – Some datas can not coerced into the expected type
Heiner