As mentioned, I did recompile the main script after every change to the library script.
It gets worse, when I turned off debugging and recompiled the script after making library script changes, everything worked fine - until I turned debugging back on in the main script. Then, it again acted as though it were using an older version of the script library file. That means I can’t use debugging, at all.
Something else, which may be related.
The original script had a property declaration:
property DirectJobsSearch:libFolderSearchlib’s DirectJobsSearch
As part of troubleshooting, I copied the handler inside the script library and renamed the copied portion as
In the main script, I changed the property declaration to read:
property DirectJobsSearchTwo:libFolderSearchlib’s DirectJobsSearchTwo
It works find until I turn on debugging and try another recompile. The IDE immediately throws an error:
AppleScript Compile Error
Can’t make DirectJobsSearchTwo into type reference.
The only way to clear this error is to turn off debugging OR edit the property declaration back to its original form, using the original handler name DirectJobsSearch, recompile, then change again to the DirectJobsSearchTwo. At which point, it will recompile with script debugging on.
Note the above behavior continues even after I change the name of the original handler in the script library to
Note that I do make sure to save the script library file after each of these changes.
Which means, with script debugging on, the AppleScript compiler does not like an EXISTING handler name, but is perfectly happy with the old handler name, even though that name no longer exists in the script library.
Again, this seems like turning on script debugging is loading some previous version of the script library. It’s all very confusing.