Dialog.GetInformation box, concerning CANCEL button

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • SilverFalcon
    Forum Member
    • Jan 2003
    • 2

    Dialog.GetInformation box, concerning CANCEL button

    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.
  • Lorne
    Indigo Rose Staff Member
    • Feb 2001
    • 2729

    #2
    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 ]]

    Comment

    • _acecombat_
      Forum Member
      • Dec 2002
      • 20

      #3
      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

      • _acecombat_
        Forum Member
        • Dec 2002
        • 20

        #4
        Re: Dialog.GetInformation box, concerning CANCEL button

        sorry im now novice i just noticed! is it to do with the amount of posts?

        Comment

        • Lorne
          Indigo Rose Staff Member
          • Feb 2001
          • 2729

          #5
          Re: Dialog.GetInformation box, concerning CANCEL button

          No, just an admin's sense of humor. Wacky admins! [img]/ubbthreads/images/icons/smile.gif[/img]
          --[[ Indigo Rose Software Developer ]]

          Comment

          • TJ_Tigger
            Indigo Rose Customer
            • Sep 2002
            • 3159

            #6
            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

            Working...
            X