Re: when is a global not a global?
Re: when is a global not a global?
- Subject: Re: when is a global not a global?
- From: "Stockly, Ed" <email@hidden>
- Date: Tue, 14 Sep 2010 17:58:14 -0500
- Acceptlanguage: en-US
- Thread-topic: when is a global not a global?
I don't see a difference in behavior from SD and SE, but since I'm just
looking at snippets of script I am probably not recreating the exact
scenario you're in.
Maybe you could provide a copy/paste-able example with the minimum needed to
replicate that requires no editing or guessing?
It sounds like it's a question of inheritance, and you're expecting a global
declared in a script object to be accessible directly in the parent script.
ES
On 9/14/10 1:43 PM, "tom wible" <email@hidden> wrote:
> when it's run in script editor:-(
>
> i recently had to run an app bundle in s.e. to debug it, and the same
> code that runs perfectly when it runs standalone fails in s.e.:
>
> property tvpi2crontabP : "/DVR/scripts/tvpi2crontab.app"
> property tvpi2crontab : (load script POSIX file tvpi2crontabP)
> ...
> global recDir
> ...
> tvpi2crontab's init() -- this initializes recDir, which is also
> declared global in tvpi2crontab
> log recDir
>
> running the above code as a standalone app bundle works perfectly,
> but when i run it in s.e. the globals aren't seen:
>
> "The variable recDir is not defined."
>
> bita by s.e. again, but a simple work-around:
>
> set recDir to tvpi2crontab's recDir -- only needed when running in s.e.
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> com
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
_______________________________________________
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