I was wondering why when an user presses the cancel button in a get information box, the result "CANCEL" is returned, why not leave the box without returning anything, now i have to use more code to prevent that my variables are being set to "cancel" as to the previous value they were set, pressing cancel should mean don't do anything.
Announcement
Collapse
No announcement yet.
Dialog.GetInformation box, concerning CANCEL button
Collapse
X
-
Re: Dialog.GetInformation box, concerning CANCEL button
There are times when you need to know that the user clicked the cancel button.
For example, what if leaving the field blank was an acceptable answer? If cancelling the dialog just returned nothing, then you wouldn't know if the user hit cancel, or if they left the field blank and clicked OK.--[[ Indigo Rose Software Developer ]]
-
Re: Dialog.GetInformation box, concerning CANCEL button
I agree with lorne entirely. A short way to do it would be add a label at the very end of your code called "end" or whatever you want to call it then just after the input request do an if %var%=cancel
Goto label "end"
end if
that would be the simplest solution [img]/ubbthreads/images/icons/smile.gif[/img]
Hey lorne u reckon u could change my user descript to something other than newbie?
Comment
-
Re: Dialog.GetInformation box, concerning CANCEL button
For those variables that might be set to "CANCEL" you can set them to "CANCEL" as a default value if that would help.
%Variable% = "CANCEL"
Dialog.GetInformation (%Variable%, "Enter your information", OK/CANCEL)
IF (%Variable% !="CANCEL")
Do what ever it is you want it to do
ELSE
RETURN
END IF
The RETURN command will stop the actions from processing further.TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
Comment
Comment