error doesn't stop progress indicator

What’s wrong with this simple picture? on an error the wheel still keeps spinning.

	try
			start progress indicator "progress_wheel"
		on error
			stop progress indicator "progress_wheel"	
		end try

Thanks, Jim

First, are you properly targeting the container of the progress item (e.g., … of window “main”)? Second, it would help if you caught the error and displayed it (or logged it) so you know what the problem is:

Jon


[This script was automatically tagged for color coded syntax by Script to Markup Code]

I had mine set to functions and they seem to work great.


on showStatus(theWindow)
	tell theWindow
		set visible of progress indicator "progress" to true
		set uses threaded animation of progress indicator "progress" to true
		start progress indicator "progress"
	end tell
end showStatus

on hideStatus(theWindow)
	tell theWindow
		set visible of progress indicator "progress" to false
		stop progress indicator "progress"
	end tell
end hideStatus

and this is how i start the progress indicator.


else if name of theObject is "show progress" then
		showStatus(window of theObject)
end if

I think so . . . it’s inside the main window. The wheel starts to spin, it just doesn’t stop with the error. The error I am trying to catch is an incorrect password (-927), but any error would do if it would just stop the wheel.


on clicked theObject
	tell window of theObject

try
	start progress indicator "progress_wheel"
	delay 3
	on error number errnum
		if errnum = -927 then
			stop progress indicator "progress_wheel"
		end if
end try

If this doesn’t work, try cleaning your target and rebuilding:

Jon


[This script was automatically tagged for color coded syntax by Script to Markup Code]