Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Old Browse Chestnut

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Old Browse Chestnut

    Hello

    Our application has a form - Order Entry. It consists of a parent and a child linked by Order No.

    If the user goes to the browse of the child and selects a row, say row 4, sometimes it will return the first row.

    The only way around this we have discovered is to click on another row different to the one you want, and THEN click on the row you want.

    The issue is sporadic, but it can lead to grief. For the user and for us as the developer.

    Apart from being extremely frustrtaing from a user perspective, I would take it as a given that if I click on row 5, it will open up this record in the form designated.

    This has been an issue for many years.

    If it is our fault Alpha, then tell us how to correct it.

    If it is a fault then can you correct it please ASAP?

    If I can be of any further help, let me know.

    Kind regards

    Alex
    Database Software Solutions Limited
    www.dbasesolution.co.uk
    http://www.precise360.co.uk
    PRECISE360 -
    LYNCHPIN -

    #2
    Re: Old Browse Chestnut

    This is not your fault. Browses are a beautiful thing but have some sort of deep flaw where sometimes the row pointer and the record pointer are somehow out of sync. I don't know the answer. Is this an embedded browse or a regular browse? If it's regular try making it an embedded or vice-versa.
    Peter
    AlphaBase Solutions, LLC

    [email protected]
    https://www.alphabasesolutions.com


    Comment


      #3
      Re: Old Browse Chestnut

      I'd like to help.

      You say "Our application has a form". Just one, or many forms with this behavior?

      You say "Apart from being extremely frustrtaing from a user perspective, I would take it as a given that if I click on row 5, it will open up this record in the form designated." This sounds like you have a button or doubleclick event firing to open the record in a form. Is that the case? If so, what other code is on this browse? I'd look closely in that area...

      Can you post an sample with a few records? I, nor any of my users (who would surely say so), are having this issue. There was something of a browse re-write by Alpha years ago that seemed to resolve my complaints of yesteryear. (Something about rewriting In XBasic?)

      I heavily dress up my forms and browses, and do use often a bit of code and put buttons with bitmaps on unbound columns. My browses / embedded or not, look nothing like the default ones, and maybe that's why?

      If an embedded browse, is there an timer event, a form filter, or other code that might trigger this? It has to be annoying. I think I had an ontimer event, or an onarrive do this to me once a few years ago. Maybe a refresh(), resynch() someplace?

      Is it all forms? Across all computers?

      Does it happen with the default form? The problem here is the word sporadic.

      Is it possible another user is has just entered a child record and the browse has just added the record on the form?

      Does anyone else see this exact behavior? Peter, have you experienced this?

      Comment


        #4
        Re: Old Browse Chestnut

        Hi Alex,
        you wrote this:

        If the user goes to the browse of the child and selects a row, say row 4, sometimes it will return the first row.
        When you use the term "return" what exactly are you meaning? What is it that represents "return". Is the record in the browse jumping to place the first record in focus? What is presenting to you that which constitutes the "return"?
        Mike W
        __________________________
        "I rebel in at least small things to express to the world that I have not completely surrendered"

        Comment


          #5
          Re: Old Browse Chestnut

          Peter, have you experienced this?
          Right, I have.
          Peter
          AlphaBase Solutions, LLC

          [email protected]
          https://www.alphabasesolutions.com


          Comment


            #6
            Re: Old Browse Chestnut

            Hello Peter & Craig

            Firstly thank you both for your kind input.

            A little more background may help.

            The form is based on a simple one-to-many parent-child set. The form uses a tabbed control with a browse of parent records on the first tab and the parent record fields on the 2nd tab with a browse for the child table. A button opens the corresponding child record.

            I have many forms like this in different applications and see the problem occasionally in many instances.

            It even happens with code generated by Alpha's own generated events.

            The original code used a form.viewqueried statement referencing the line number of the browse record. Line number field is a unique number.

            The problem is that a row in the browse other than row 1 is selected, but the form for row 1 gets opened instead of the selected row.

            Clicking on the row above or below the row you want and then clicking the row you require seems to work most of the time in opening the form for the correct record.

            There are no timer events.

            There are filters sometimes applied to the form e.g. show orders for a selected customer, show only orders to invoice, show a particular order but such are needed.

            Users can double click the row or more usually select the row then click on the button.

            To open the child form (t1 is parent table, t2 child table), if clicking on the button run action event to activate previous object - ie the selected row - then run this code

            t1 = table.current(1)
            t2 = table.current(2)

            if t2.lineno = 0 then
            tln = table.open("linenum", FILE_RW_EXCLUSIVE)
            tln.fetch_first()

            t2.change_begin()
            t2.lineno = tln.lineno
            t2.change_end()

            tln.change_begin()
            tln.lineno = tln.lineno + 1
            tln.change_end()

            tln.close()
            end if

            var->cLineno2 = t2.lineno2
            var->nLineno = t2.Lineno
            var->cItemcode = t2.Itemcode
            var->nEodrecno = t2.recno()

            parentform.Commit()

            opnEstlines()

            function opnEstlines as L()
            t = table.open("enqordd")
            query.options = ""
            query.order = "recno()"
            query.filter = "Lineno = var->nLineno"
            q = t.query_create()

            if q.records_get() > 0 then
            t.query_detach()
            t.close()
            query.filter = ".T."
            :form.ViewQueried("Estlines", "Lineno = var->nLineno")
            end
            end if

            query.options = ""
            query.order = "recno()"
            query.filter = "Lineno2 = var->cLineno2"
            q = t.query_create()

            if q.records_get() > 0 then
            t.query_detach()
            t.close()
            query.filter = ".T."

            :form.ViewQueried("Estlines", "Lineno2 = var->cLineno2")
            end
            end if

            query.options = ""
            query.order = "recno()"
            query.filter = "recno = var->nEodrecno"
            q = t.query_create()

            if q.records_get() > 0 then
            t.query_detach()
            t.close()
            query.filter = ".T."

            :form.ViewQueried("Estlines", "recno = var->nEodrecno")
            end
            else
            ui_msg_box("Error", "Line not found. Please re-index.",UI_OK)
            end if
            end function

            If the user double clicks on the row, the activate previous object event is not needed, but often the wrong row is still opened.


            Many thanks

            Alex
            Database Software Solutions Limited
            www.dbasesolution.co.uk
            http://www.precise360.co.uk
            PRECISE360 -
            LYNCHPIN -

            Comment


              #7
              Re: Old Browse Chestnut

              Alex:

              So, like Mike asked, it's not the first record that it jumps focus to in the browse, it's a custom event you fire with a double click interacting sometimes with the wrong record, right???

              I make my browse rows very large. I still have a few dozen double click browse events out there, but switched to buttons with graphics long ago. Any chance they are double clicking on a small browse line and making it a bigger target would help???

              Screenshot (190).png

              I have a heavy day ahead, but will create a sample table we can toss back and forth until we get something that either reproduces or eliminates the issue. If a bug report and a sample are produced, you have a better albeit weak, chance AS will invest time in a fix.

              I will use the zip code table for data. OK?

              You code looks OK at first glance with my only immediate flag was I always use table_get() for all child tables. That said, I have a LOT of browses with double click events that never interact with records other than the one that is double clicked.

              I will talk to at least 5 users today, and ask them to watch my forms for this behavior. Given that I am not a user, maybe they are experiencing, but biting their tongues? Hard for me to swallow that thought with something this annoying.

              Anyway, maybe someone else like Peter will see an issue (If there is one on your side) immediately. (Where's Stan? He is amazing to me!)

              Comment


                #8
                Re: Old Browse Chestnut

                A couple of things off the top:

                I always create my functions under the code tab. Is it written directly in the doubleclick script? Never knew that worked, (I know it does in other code languages AFTER the end statement, or in the HTML header) but usually I only write a function if I use it in more than one script or an expression with limited space.

                Then, you supply arguments within the brackets.

                The parentform.commit() looks like it might be triggering a .refresh() or a .resynch()? It doesn't look like there would be anything new on the parent that wasn't committed on sending focus to the browse. (I am a bit blind, mind you!)

                If you are OK, tomorrow I'll separate the function in my example placing it on the code tab... or even better we can just not make it a function since it cannot be called anywhere else, right?

                Still see no reason for the pointer to jump as Peter and you have experienced, but I am thinking it's the script or something about the form.

                So, for my own info, can a function written within a script be called elsewhere as if written on the code tab, presumably after the script has been run once? I am thinking not, but maybe that's my lesson of the day...

                Comment


                  #9
                  Re: Old Browse Chestnut

                  Hi Craig

                  Try creating a form based on a parent child one-many set.

                  Above the browse part of the form, put a button using the Alpha action scripts to open a child form whose record matches the currently selected row in the browse - so no xbasic, just action scripts generated by Alpha itself.

                  Try using that form and opening various rows in the browse and you will see that the correct child record is not always opened in the child form.

                  At present, whenever a user wants to open a line in a browse I have added in a dialog box to display the current line number taken from the selected row in that browse so they can confirm that they want to open that line in the child form. That way if the record selector thinks it is on the 1st row instead of the selected row, at least the user can choose the correct line no in the dialog box. This is a workaround only.

                  Many thanks

                  Alex
                  Database Software Solutions Limited
                  www.dbasesolution.co.uk
                  http://www.precise360.co.uk
                  PRECISE360 -
                  LYNCHPIN -

                  Comment


                    #10
                    Re: Old Browse Chestnut

                    OK, but I'm not a big action script fan! I never use it as is. It gets kind of thick in those scripts, with the error trapping and all.

                    Are you saying it has to be action scripting to do this jumping?

                    Tomorrow, though. Today is really busy.

                    Comment


                      #11
                      Re: Old Browse Chestnut

                      put a button using the Alpha action scripts to open a child form whose record matches the currently selected row in the browse.
                      We use this method in some cases and I can't remember having any problems.

                      Personally I prefer to add a button on each row of the browse as the user can then perform the required action with a single click. Example:
                      Code:
                      function Actions_ButtonClick as v( event as C,data as C, row as N)
                      	this.Set_Viewport_row(row)
                      	if this.Table_Get().Mode_Get() > 0 then
                      		this.Commit()
                      	end if
                      	:Form.viewqueried("Details","C_ID=C_ID","","Normal","","",.t.)
                      end function

                      Comment


                        #12
                        Re: Old Browse Chestnut

                        I've had this Alex and it's a pita.
                        Is the update form too big to have on the same page as the browse?
                        Example.
                        5 line browse above the update area.
                        Line selected in browse should show correct record below, which can be edited.

                        I'm working away this weekend but will watch this one with interest.
                        See our Hybrid Option here;
                        https://hybridapps.example-software.com/


                        Apologies to anyone I haven't managed to upset yet.
                        You are held in a queue and I will get to you soon.

                        Comment


                          #13
                          Re: Old Browse Chestnut

                          So, I was unable to reproduce Alex's issue with 200 double clicks. I still see no pointer issues with browse at this point.

                          I sent him these files via email yesterday, as the message board was down, but have not heard back from him, yet.

                          Attached are my results in a small app I created following his request that I use Action Scripting. I did not use table.current(2) in favor of table.get(). Using table.current beyond the parent level always struck me as a risky wildcard if the set structure was ever changed...

                          On opening the app, look for and open TEST_FORM... 2 forms open. Looking at TEST FORM you can scroll the parent records (US States & Territories), and double click the Zip codes.

                          Each DC records a zip code and time in the LOG FORM first, opens that line in a POPUP form, which fires the OnTimer after 2 seconds creating another LOG FORM entry and refreshes the form to show the 2 log entries. Then the POPUP closes.

                          This allows rapid-fire testing.

                          I still prefer buttons feeling it is a cleaner interface.


                          DOUBLECLICK TEST.zip

                          Comment


                            #14
                            Re: Old Browse Chestnut

                            Oh, another POI, if the TEST_FORM had a browse line that was partially showing on the bottom, a DC would move that line up two lines, retaining focus. The DC might or might not fire, but when it did, the pointer stayed true. I adjusted the form so only entire lines were visible.

                            Alex, this tests a basic DC. You mention a tabbed form. To go any further, you are going to need to get a copy over to us to see, or create a new form in our test files that reproduces the issue you are having
                            Last edited by CraigSchumacker; 02-24-2020, 11:42 AM.

                            Comment


                              #15
                              Re: Old Browse Chestnut

                              Couple of things Craig.
                              Alex has multiple users - so locking could be an issue
                              Selecting a tab with the data for the record should be relatively easy
                              However, Exclusive use when updating might compound the issue

                              If a rewrite is required, that is another issue.
                              See our Hybrid Option here;
                              https://hybridapps.example-software.com/


                              Apologies to anyone I haven't managed to upset yet.
                              You are held in a queue and I will get to you soon.

                              Comment

                              Working...
                              X