I want to change the number formatter in a table view’s columns dynamically by the script, once as an integer-format, once as a decimal-format.
I tried this, but without success.
set countOfRows to (count of data rows of dataSource)
tell dataSource
repeat with i from 1 to countOfRows
set theDataCell to contents of data cell "a" of data row i
--log theDataCell
set newFormat to (call method "setFormat:" of object theDataCell of class "NSNumberFormatter" with parameter "0.0")
--log newFormat
end repeat
end tell
Can anyone help me?
Heiner
Model: eMac
Browser: Safari 419.3
Operating System: Mac OS X (10.4)
set fmter to formatter of data cell of table column 1 of table view "tv" of scroll view "sv" of window 1
-- get:
set fmt to call method "format" of fmter
-- set
call method "setFormat:" of fmter with parameter "0.0"