I have been developing a script and its associated libraries for many years. I am starting work on a new version. When I copy the scpt to give it a new name, it works fine. However, if I add a comment or change one character of the code, it “breaks”. It suddenly throws an error that parameters for a handler do not match. I have checked this several times. Exact copy = OK. Change to copy = breaks.
Can someone think of any reason why this is happening now?
The library that it should be referencing is in
For some reason, when I make a change to the script, it switches to the library in
Why would it make that change and how do I change it back?
Changing the name in
from FolderSearch_lib.scpt to FolderSearch_lib2.scpt
with corresponding change in Use statement
from: use libFolderSearchlib : script “FolderSearch_lib”
to: use libFolderSearchlib : script “FolderSearch_lib2”
cleared up the problem.
I’d still like to know why a minor edit would cause it to switch libraries.
Note: the main script file is located in
if that is some kind of clue.
That sounds highly irregular — libraries should only be found in the defined library search path.