My application which has been running smoothly for a number of months doesn’t work on my Mac since installing Yosemite.
The error seems to centre around:
set thisVariableSub to (AppDelegate’s thisVariable) as string
This is calling a property in the AppDelegate from a second script.
It may be this wasn’t the best practice way of doing this but it was certainly working. Now it isn’t. Has anyone experienced similiar? Is there a better way to call properties in one script from another?
ok - fixed this myself but don’t understand why.
Instead of calling the property directly I create a simple getter:
return thisVariable – where thisVariable is the property I want to pass to the other script
then in the second script I call
set thisVariableSub to appDelegate’s getThisVariable as text
one for the mental database…
You should use:
set thisVariableSub to (AppDelegate's thisVariable()) as string
It’s a method call, so you should use parentheses – sometimes it works without them, but there can be side-effects.
ok will do - thanks Shane.