estockly
(Ed Stockly)
February 13, 2019, 8:53pm
#1
Pasted this in a new script document. Compiled, switched to Debugging, tried to step in.
————
script foo
property y : 5
to test(x)
return x
end test
end script
property parent : foo
test(y) --> 5
————
Instant crash with apple crash reporter (https://www.dropbox.com/s/7qehswmzarj8mui/2019-02-13-ObjectCrash.txt?dl=0 )
My E-Mail address is ed.stockly@latimes.com , in case you want to get back to me.
–> Script Debugger 7.0.6 (7A69) (Updating now)
–> Mac OS 10.11.6 (15G22010)
estockly
(Ed Stockly)
February 13, 2019, 8:57pm
#2
Exact same behavior in
–> Script Debugger 7.0.7 (7A72)
–> Mac OS 10.11.6 (15G22010)
alldritt
(Mark Alldritt)
February 13, 2019, 9:05pm
#3
This is an AppleScript crash. You’ve created a circular script object parent relationship and AppleScript does not defend against this. This will crash in the Script Editor as well.
estockly
(Ed Stockly)
February 13, 2019, 9:45pm
#4
Dang. OK. I was going to say it happened after relaunching.
Funny thing is that script came directly from a tutorial on MacScripter on using Script Objects.
It’s like the 6th sample down.
script foo
property y : 5
to test(x)
return x
end test
end script
property parent : foo
test(y) --> 5
I wonder how it’s supposed to look.
(While I’m at it does anyone know a good source for a tutorial on using script objects that’s not a crashy as the one on MacScripter?)
https://www.macscripter.net/viewtopic.php?pid=96390#p96390