access to reparented enclosing script
access to reparented enclosing script
- Subject: access to reparented enclosing script
- From: Mitchell L Model <email@hidden>
- Date: Wed, 29 Jun 2016 20:24:56 -0400
This is getting weirder and weirder. Going back to my long post with Outer/Inner
script objects where I was trying to access a top-level value from the Inner script
objects, I added the fourth line here:
use AppleScript
use scripting additions
property parent : script "
property theValue: 1
then later, at the top level:
set theValue to 2
- - - -
log theValue -- 2, of course
But, inside Inner1:
script Outer1
property parent: AnOuterScriptObject
script Inner1
property parent: AnInnerScriptObject
log theValue -- 1, not 2
end
end
I don't understand why Inner1 can see ANY value for theValue,
since its parent is off to the side of the lexical structure of the script.
But if it is going to see a value, why not the dynamically set one instead
of the compiled property value. This must say something important about
how properties and nested script objects are handled during compilation,
but I can't straighten this out.
_______________________________________________
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