Re: Possible bug.
Re: Possible bug.
- Subject: Re: Possible bug.
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 03 May 2004 08:48:52 -0700
On 5/3/04 7:37 AM, "Deivy Petrescu" <email@hidden> wrote:
>
Paul, I believe, Chris has settled it, but since
>
I learn a lot here, and I believe a lot of other
>
people do too, let us clarify some points.
>
Also, I think you post very relevant answers and,
>
thus you should be even more careful with them.
>
>
You said "it doesn't say anything about 'number'
>
or 'real', does it? ". Yes it does. You are
>
interpreting script text in the narrowest
>
possible way.
>
According to AS "run script: Run a specified
>
script or script file". Well, 2^3+1 is a script
>
according to my Script Editor, thus it is fair
>
game for run script script.
Yes, but you have to put it into quotes first in order to 'run script': that
makes it 'text' - one of the two formats allowed/
Here's another script that runs fine in Script Editor:
path to desktop
Now try
run script (path to desktop)
--> ERROR: Scripting component error
Now try
run script "path to desktop"
--> alias "PB G5 HD Panther:Users:berkowit:Desktop:"
It needs a string. Just give it a string.
>
>
Also, I believe anything that behaves
>
inconsistently and can throw a scripter off is a
>
bug.
Well, that's an interesting definition. Some people are thrown off by all
sorts of things in AppleScript, including
set x to 5
>
>
This particular problem gave me a big headache because of its characteristics.
>
If you run the original in SE with the Event log
>
window toggled on, then you see
>
"x is 0.111111111"
>
Then you copy and paste 0.111111... and it runs fine.
>
>
Because I was not looking at "run script', I
>
thought of a possible major breakdown in AS.
>
About 2 hours of unpleasant feeling if you will.
It would be good if coercions worked consistently, I agree completely.
That's why I'm not surprised that Chris says there's a bug in the
AppleScript parser for long numbers. But I still would never blame 'run
script', nor is there anything to blame in the explicit coercion:
(1 / (2 ^ 3 + 1)) as string
--> "0.111111111111"
never has an error, nor does
run script ((1 / (2 ^ 3 + 1)) as string)
>
>
I do not know if the list is in favor of this or
>
not, but my personal opinion is anything that
>
behaves in an inconsistent manner should be
>
pointed out to the list as a bug, whether
>
bonified or not by the Apple and the AS team.
>
We can document it by ourselves.
Sure. If Apple had not yet known about the parser bug, analyzing this
problem would have led them to find it, if they know that
number-to-string-coercion should always work in a 'run script' context. So
it's always good to report these things. Nevertheless, in a practical sense,
they have documented 'run script' to work with text and with script files,
and if you give it what it asks for, there's no bug with 'run script'.
--
Paul Berkowitz
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.