Hello
At 12h13, I posted about an odd behaviour which is not flagged as an error.
Now, I post about an error message issued when there is no error.
set t_name to "testIfEmpty"
tell application "Numbers" to tell document 1 to tell sheet 1 if not (exists table t_name) then make new table with properties {name:t_name, row count:1, column count:1} end if set tProps to get properties of table t_name
set nbr to (row count of tProps) - 1 if nbr > 0 then try repeat nbr times delete row 1 of table t_name end repeat on error errMsg number errNbr display dialog "error number : " & errNbr & return & errMsg end try end if
set nbr to (column count of tProps) - 1 if nbr > 0 then repeat nbr times delete column 1 of table t_name end repeat end if
end tell
When the dialog displaying the error message, click OK. The script will continue and the extraneous row and column are correctly removed.
Isn't that a funny bug ?
The behaviour is the same under 10.4.11 and 10.6.3
Yvan KOENIG (VALLAURIS, France) lundi 10 mai 2010 14:00:06
|