I’m building my first AppleScript studio application. It was going smoothly until I hit this seemingly insurmountable problem:
I created a bit of code that placed the path name of a file from an “open” panel into a text field. The open panel was invoked by pressing a button beside this text field.
I deleted the code for the button that governed everything except merely opening the panel. I compiled and ran the program, and selecting a file still caused it to enter the path into the adjacent text field. Now, this was rather odd since there was no longer any reference to the text field in the script. The script should not have been touching that field at all.
Thinking that perhaps I had somehow compiled an older version of the script, not the version I was currently working on, I deleted the part of the script that invoked the “open” panel when clicking the button, and recompiled to see if this change would take effect. The button ceased to function, as it should.
Next, I deleted ALL of the script, saved it, and added back in the bit that invoked the open panel:
on clicked theObject
display open panel attached to window of theObject
end clicked
At this point, this was the entire contents of the program.
Impossibly, the button still had complete functionality after compiling. I quit Xcode, I quit Interface Builder, I shut everything out that could possibly be creating a problem, and opened the project file once more.
Only one Applescript file in the project, check.
Only these three lines of code in said Applescript, check.
Only one button with clicking behavior defined, pointing to afformentioned script, check.
Compile.
Run.
Same problem.
What is going on?