Hi all! I recently ran into a snag with my program. If I build the application, everything works nicely, but if I closed down XCode and come back later to run my App, I start getting errors that variables are not defined. It works fine from a fresh build, but only for so long.
Here is the part of my code giving me problems. (I have the “try” sections commented out so I could actually see what the error was.)
if name of theObject is "rotateCW" then
tell progress indicator "theSpinner" of window "mainWindow" to start
--try
tell application "Image Events"
set theImage to (item currentListPosition of sourceList)
set rotateImage to open theImage
rotate rotateImage to angle 90
save rotateImage
my loadPhoto()
end tell
(*on error
display dialog "Cannot rotate image. (Possible cause(s): No image selected, permission denied.))"
end try*)
tell progress indicator "theSpinner" of window "mainWindow" to stop
end if
This is the error that is received.
If works like a charm when doing a “build and run”… not sure what to do here.
Thanks much.