Hello, I’m brand new here. I’m new to AppleScript Studio, and relatively new to AppleScript, although I have a good background in other sorts of programming/scripting.
I was working my way through the AppleScript Studio Programming Guide, and things were going fine until I got to the the Mail Search tutorial. Naturally, I typed in the script myself, but when I got stuck with this NSReceiver thing, I copied and pasted the code provided with the sample project into my script, and got the same results. There were other oddities that I think I’ve worked out (like the sample code had a weird character in place of a “less than or equal to” character, and as far as I can tell it’s not neccessary to say “display panel window “status””, you can simply say “display panel “status””), but even the the script compiles it run into some sort of runtime error.
The error itself is:
AppleScript Error
NSReceiverEvaluationScriptError: 4 (1)
Through liberal use of commenting lines out and display dialogs, I was able to isolate the problem to this handler, and specifically the three lines noted with comments. When I comment out all three lines, I do not get the error (or any error). Naturally, the application won’t work
on openPanel(statusMessage)
if initialized is false then
if not statusPanelNibLoaded then
load nib "StatusPanel"
set statusPanelNibLoaded to true
end if
tell window "status"
-- THESE THREE LINES SEEM TO BE THE CULPRIT --
set indeterminate of progress indicator "progress" to true
tell progress indicator "progress" to start
set contents of text field "statusMessage" to statusMessage
-- ---------------------------------------- --
end tell
set initialized to true
end if
display panel "status" attached to theWindow
end openPanel
I’ve noted some discussion on versions of Tiger breaking AppleScript Studio applications, but nothing that seems to really help me. Does anyone know why this would be happening, or can tell me how to fix it?
Model: PowerMac G5 dual 2.7, OS X 10.4.7
AppleScript: 1.10.7
Browser: Firefox 1.5.0.6
Operating System: Mac OS X (10.4)