4 Replies Latest reply on Dec 13, 2016 5:09 PM by erolst

    Possible Bug in GOTO Object

    bobele

      When you specify GOTO Object and type in the object name, Filemaker automatically puts the object name between quotes

      This seems to make it do some weird things (like instead of going to the object, it goes to the last field you entered

      (I had an CUSTOM DIALOGUE error message triggered on object exit. So, when I clicked in a new field, the error message came up and should normally have sent me back to the error field but instead it sent me to the field I had clicked in)

       

      I think I have solved the problem (after much fretting). You have to go back into the dialogue and take out the quotes. Unless I have misunderstood something, the seems to be something that could be ironed out in the next revision

       

      Bob

        • 1. Re: Possible Bug in GOTO Object
          erolst

          bobele wrote:

          I think I have solved the problem (after much fretting). You have to go back into the dialogue and take out the quotes. Unless I have misunderstood something, the seems to be something that could be ironed out in the next revision

           

          Bob

          If you take out the quotes they're automatically reinserted; text in a calculation engine dialog must be between quotes.

           

          The easiest solution is: don't use quotes when specifying an object name.

           

          As to the topic of object names and quotes in general:

           

          The box in the Inpector is not a calculation dialog, which means that you don't need to use quotes there; but if you do, they're part of the name.

           

          In the Go to Object dialog, you must use quotes to signify a string.

           

          This combination may make for a bit confusion, because:

           

          Inspector: myObject - Go to Object: "myObject" - quotes here are syntax, not data; the result is myObject

           

          Inspector: "myObject" - Go to Object: "\"myObject\"" (or Quote ( "myObject" ) ) - outer quotes are syntax, inner quotes are data; result is "myObject"

           

          If you name your object "myObject" and in Go to Object use "myObject", the object won't be found (myObject <> "myObject").

           

          Whether that was the reason or not, I'd interpret the behaviour you observed as: you were not sent back to the field, you never left it. (If you have FM Advanced, you can test this with the Script Debugger.)

          • 2. Re: Possible Bug in GOTO Object
            bobele

            In the Go to Object dialog, you must use quotes to signify a string.

             

            In my version (13) in the GOTO dialogue box you type the object name without quotes and when you click OK it puts them in automatically

            • 3. Re: Possible Bug in GOTO Object
              philmodjunk

              I think that what you are observing had nothing to do with quotes.

               

              OnObjectExit is triggered before filemaker processes the event that tripped the trigger. The script runs to completion and then Filemaker processes the event.

               

              Example: you press tab to exit the field. This trips your trigger. Your script does what you set it to do and your go to object step puts the focus on the named object. BUT that tab keystroke hasn't been processed yet. It is now processed and the focus is changed to put the focus on the next layout object in the Tab order. This can be prevented if you end your script with Exit Script [False].

              • 4. Re: Possible Bug in GOTO Object
                erolst

                bobele wrote:

                In the Go to Object dialog, you must use quotes to signify a string.

                You must do that in every calculation dialog, but there are some script steps and options where they are added automatically, depending on length (eg in Show Custom Dialog).

                 

                bobele wrote:

                ... type the object name without quotes and when you click OK it puts them in automatically

                So I wonder why you thought that "to go back into the dialog and take out the quotes" has any effect.