I have a long script that uses Shane Stanley’s Dialog Toolkit.
One handler in that script is this:
on setActiveOnMain:sender
set theAlert to theAlert of _alertRecord
((theAlert's buttons()'s objectAtIndex:0)'s setEnabled:true)
end setActiveOnMain:
On my computer, this will not compile, it highlights the parenthesis after “buttons” and errors: “Expected “,” but found “(”.”
If I remove those parenthesis, it compiles and runs fine on my computer. So on my computer, it has to be this:
on setActiveOnMain:sender
set theAlert to theAlert of _alertRecord
((theAlert's buttons's objectAtIndex:0)'s setEnabled:true)
end setActiveOnMain:
But if I compile it this way and save it as a .scpt and run it from FastScripts, then when it’s run on other user’s computers (several other users) the “OK” button in the dialog of the Dialog Toolkit window will never be enabled. It works fine on my computer.
On out other developer’s computer, it won’t compile without those parentheses. I can’t check right now, but I believe he said that if he opens a copy without the parentheses and compiles, that they are automatically added back in. I can not save an executable with the parenthesis, because I can’t compile with them. He has to compile on his computer and save it with the parenthesis so it will work on other people’s computers.
The copies he saves with the parenthesis still run fine on my computer.
So right now, I can’t even make small changes to any part of this script, because in order to compile, I have to remove the parenthesis, which breaks the script for other users.
We are all on the identical copy of Dialog toolkit.
Both of us are editing in the latest version of Script Debugger.
I’m on Sierra… it’s possible the other developer and the users who’s buttons don’t become active might all be on High Sierra.
Is this caused by the OS Version difference? If not what? And is there any way around this, short of getting on the same OS version?
I can paste the whole script if anyone wants it, but it’s 5,200 lines and isn’t going to compile for you without heaps of dependencies… or run without heaps more… and I hoped that context wouldn’t be relevant to this problem.
Thanks in advance for any help…
- tspoon.