1 2 Previous Next 19 Replies Latest reply on Aug 17, 2009 8:54 AM by davewightman

    Double Click on a line in List View

    davewightman

      Title

      Double Click on a line in List View

      Post

      I use a number of list view layouts for a database of contacts. Each line of the listing is configured as a button which runs a script which goes to the full contact data layout in form view. In FMP 9 I find that I usually (but not always) have to click the button twice to make the script execute. The first click simply makes that record in the list the active record, then the second click operates the button and runs the script. In FMP 6 only one click on the line/button is required and this is the preferred behaviour for me. Is there some way I can get the button to respond to the first click in FMP 9?

        • 1. Re: Double Click on a line in List View
          mrvodka
             Perhaps there is another object that overlaps the button?
          • 2. Re: Double Click on a line in List View
            davewightman
               I don't think so. There are 4 or 5 fields in each line. The fields are grouped and formatted as a button to execute the script. They are brought to the front so nothing is overlapping them. 
            • 3. Re: Double Click on a line in List View
              philmodjunk
                

              Try using this method on a new layout in a new file and see if it also requires a double-click. This doesn't sound like normal behavior for this type of layout object.

               

              • 4. Re: Double Click on a line in List View
                comment_1
                  

                davewightman wrote:
                I usually (but not always) have to click the button twice to make the script execute.

                Perhaps you are clicking outside the button area. Try putting a rectangle that covers the entire body part behind all other objects, and make it the button.

                 

                 --

                You will need to make your fields non-enterable for this.


                • 5. Re: Double Click on a line in List View
                  davewightman
                     Thanks to everyone who responded. I tried all of the suggestions without success but finally realized what my problem was. In all of the list layouts with the button that required two clicks I had a search field in the header portion which I used to search for a name using a Find script. Each time I went to one of these layouts my script made that field active so I could immediately enter a search term. So the records showing in the list view were not active. The first click brought the list item active and got me out of the header field and then everything is normal. The solution is to simply go to the layout but do not go to the search field. Then a single click on the list line button works perfectly. If I want to do a quick search now I manually click in the search field and do the search. Moral of the story is not to make a field in the header of a list view layout active if you want the list view buttons to work on the first click.
                  • 6. Re: Double Click on a line in List View
                    comment_1
                       Well, that's interesting, but it's hardly the correct explanation: clicking on a button ONCE should trigger the action, regardless of a field being active at the same time - in the header or anywhere else. At least that's how it works for me.
                    • 7. Re: Double Click on a line in List View
                      davewightman
                        

                      Well it is the correct explanation because that's exactly what happened. The field in the header has to be global for the quick search to work and that may be creating the problem. I can remember some time ago running into some weird behaviour when I placed a field in the header of a list view layout. There's probably a way to do it but my simple solution works fine for me. The search field is still there in the header and when I need it works fine. I just click into it manually instead of having a script take me into it.

                      Thanks again for your help. 

                      • 8. Re: Double Click on a line in List View
                        comment_1
                           And what happens now, if you (1) click into the global field in the header, (2) click the button in the body of  an arbitrary chosen record (while the cursor is still in the global)?
                        • 9. Re: Double Click on a line in List View
                          davewightman
                             Good question. What happens is that the cursor disappears from the header field and activates the record I have clicked. (By "activate" I mean the vertical black bar at the left edge of the list layout moves from the first record to whatever record I clicked.) The button script does not execute until the second click. What's even more puzzling is that until I make a second click on one of the records, clicking other records just moves the black bar. If I do not enter the header field at all, everything works as it should.
                          • 10. Re: Double Click on a line in List View
                            philmodjunk
                              

                            What script (or script step) executes when you click the row? Perhaps there's a clue there somewhere.

                             

                            Are you always in browse mode when you click the row? (You mentioned a find)

                            • 11. Re: Double Click on a line in List View
                              comment_1
                                

                              davewightman wrote:
                              What's even more puzzling is that until I make a second click on one of the records, clicking other records just moves the black bar. If I do not enter the header field at all, everything works as it should.

                               

                              That is puzzling indeed, and I cannot reproduce this behavior. Can you post a copy of your file somewhere?


                              • 13. Re: Double Click on a line in List View
                                philmodjunk
                                  

                                I downloaded a copy of your file and tested it. A single click is all it takes to take me to the correct contact record in the other file.

                                 

                                On a side note, your find script uses copy and paste to set up and perform your find. This is not the best method to do this as it destroys the contents of anything the user may have copied to the clipboard. It also sets you up for a "silent failure" (Script runs incorrectly but error condition fails to interrupt the script or display an error message) if you should run the script without the specified fields being present on the layout.

                                 

                                Using set field to copy the contents of the global field avoids these problems.

                                 

                                Using FMP 10 on windows xp sp3.

                                • 14. Re: Double Click on a line in List View
                                  comment_1
                                    

                                  It only takes one click here - provided you click inside a button-defined area. There's a LOT of surrounding space where a click doesn't do anything except change the current record.

                                   

                                  Tested on FMPA 10, OS X 10.5.7.

                                  1 2 Previous Next