Re: funny bug
Re: funny bug
- Subject: Re: funny bug
- From: CYB <email@hidden>
- Date: Mon, 10 May 2010 18:13:48 -0500
- Thread-topic: funny bug
Title: Re: funny bug
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
Yvan, your script works as expected. It throw an error message because there is an error, when your script try to delete the last row, remove the try block and see what happen
Carlos Ysunza B.
Director
Ysunza/Santiago
Comunicación Visual • Automatización
Tel. (52)55 5256-0336
email@hidden
http://www.ysunzasantiago.com
http://www.thesecretmexico.com
http://www.softrobot.com.mx
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
References: | |
| >funny bug (From: Yvan KOENIG <email@hidden>) |