The library script “email_functions_lib3” already exists. The handler “SendEmailAndAttachment3” has already been successfully referenced and used in previous versions of the main script.
I have added another handler “SendF_EmailAndAttachment” to that library script. When I attempt to add a Property statement to the main script, compilation fails with the error “Can’t make SendF_EmailAndAttachment into type reference.”
I am dumbfounded and do not know how to proceed. As you can see from the attached image, the format for the new Property statement is exactly the same as for the old one.
Note: using Script Debugger 6.0.8
Library script is located in [Home]/Library/Script Libraries
I found a previous post from Suzume in April 2018, who pointed out a bug that library references did not take if “Script Debugging” was enabled.
I turned off “Script Debugging” in both the main script and the library script but still get the same compiler error.
Solution: Renaming the library script file to “email_functions_lib4” vice “email_functions_lib3” and changing the references in the main script to match allowed the script to compile properly.
I consider this bizarre behavior.
Was this addressed in the Script Debugger 7 upgrade?
What you describe appears to be a compiler issue — that’s not something Script Debugger can change.
(Personally, I’m not at all comfortable with the idea of using handler names to refer to handlers.)
The problem appears to be that library script files in the same folder tree as the main script have precedence over [home]/library/script libraries. I MUST have additional copies in that same tree to be included in the Mercurial repository. My workaround is to put that repository copy in a ZIP archive where the compiler cannot find it.