I have a script that runs a shell script. It submits, runs the shell script, then I used orderOut to hide the window. After 10 sec (ie), the window returns (makeKeyAndOrderFront) and you fill out the form and post again. Only this time when I post, it tells me those fields are empty. Below is the code that is relevant. Bindings are used on each text field. What gives?
on postUpdate_(sender) -- when you click button postUpdate
try -- to catch errors
progressBar's startAnimation_(true)
--set variables
set userId to userId's stringValue() as string
set projectName to projectName's stringValue() as string
set logEntry to logEntry's stringValue() as string
-- check if fields were left empty
if logEntry = "" then
display dialog "You must enter project notes."
return
end if
if projectName = "" then
display dialog "You must enter a project name."
return
end if
if userId = "" then
display dialog "You cannot submit until you define a user."
return
end if
-- do shell script here
progressBar's stopAnimation_(true)
postWindow's orderOut_(sender) -- release window
on error thisError -- if error, show error.
display dialog thisError
end try
end postUpdate_
Thanks for the help.
Browser: Safari 533.16
Operating System: Mac OS X (10.6)