Re: Error: Stack overflow
Re: Error: Stack overflow
- Subject: Re: Error: Stack overflow
- From: Jon Pugh <email@hidden>
- Date: Tue, 29 Apr 2003 22:34:15 -0700
At 1:33 AM +0100 4/30/03, John Delacour wrote:
>
set d to "1/1"
>
set n to "" & (current date) - (get date d)
>
set fU to "/tmp/" & n & ".txt"
>
set f to POSIX file fU
>
--> file "dx:private:tmp:10286845.txt"
>
open for access f with write permission
>
set s to "***** hello *****"
>
write s to f
>
close access f
>
read f
>
--> "***** hello *****"
>
tell application "Finder"
>
get f
>
--> file "dx:private:tmp:10286845.txt"
>
set creator type of f to "NISX"
>
--> STACK OVERFLOW
>
end tell
It comes from using a "POSIX file" reference in the Finder, which apparently cannot cope and returns error -2706 which AppleScript mistakes for errOSAStackOverflow or something.
If you move your file reference into the Finder compatible form, it all works. Here I simply coerce f to a Finder "file":
>
tell application "Finder"
>
set f to f as file
>
--> file "dx:private:tmp:10286845.txt"
In the your script, f was an 'furl' whereas in the new version it's an 'fss '. Both appear the same in "human readable" form.
>
Your mission is to work out why :-)
Good enough?
Jon
_______________________________________________
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.