Re: Still more strange things …
Re: Still more strange things …
- Subject: Re: Still more strange things …
- From: Axel Luttgens <email@hidden>
- Date: Thu, 22 Jan 2004 00:03:10 +0100
Christopher Nebel wrote:
On Jan 21, 2004, at 1:38 AM, Jean-Baptiste wrote:
I've encountered the following in a script :
set theArray to {}
repeat 4 times
set end of theArray to theArray
end repeat
--> {{, , , }, {, , , }, {, , , }, {, , , }}
What does it mean ?
(For those still confused, the result really looks like this:
{{..., ..., ..., ...}, {..., ..., ..., ...}, {..., ..., ..., ...},
{..., ..., ..., ...}}
...except that the "..." are ellipsis characters in real life. Insert
ritual cursing of the list server here.)
That's very tempting... But may I really dare?
[...] (By the way, the original script works fine for me on Panther.
I have no idea what Axel's problem is/was.)
I'll try to be more exhaustive in my description.
When running the culprit in the Script Editor:
set theArray to {}
repeat 4 times
set end of theArray to theArray
end repeat
the "Run" button is greyed out and the "Stop" button remains
indefinitely active; I have to press the latter (or to do a shift-point)
to gain control again.
This is what I called, perhaps abusively, "looping".
(Note that Deivy seems to encounter the same behavior as I do, as he
wrote: "First you run your script in Smile, because script editor just
loops").
Now, after having sent my message, I discovered that by just adding this
line to the above script:
log theArray
running the script immediately raises an error message about stack
saturation.
On the other hand, if instead of "log theArray", I add this line:
get theArray
the initial behavior (ie. the "looping") shows again.
This happens whichever pane is active (Description, Result, Log).
Script Editor's preferences are unchanged since install.
No OSAXen.
Axel
_______________________________________________
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.