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

FreshenBrowse Challenge

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

    FreshenBrowse Challenge

    A number of recent message threads have involved questions about how one can arrange for an embedded browse to be updated automatically. This usually seems to arise when folks have loaded a form with the browse, and then call a second form to do data entry into the linked child table.

    Here's an example that illustrates the problem.

    If you push the Delete Current Phone button, the current child table record is, in fact, deleted, but the browse is not refreshed to show it.

    If you add a new Phone Record, calling a regular form or calling a dialog form, the new phone record is not shown when the called form closes.

    Hope this is clear and useful!

    Ok guys and gals. What's the best way to automatically refresh the browse?

    -- tom cone

    #2
    RE: FreshenBrowse Challenge

    Let me try to upload the zip file one more time.

    -- tom

    Comment


      #3
      RE: FreshenBrowse Challenge

      Tom:

      Out of curiousity, is there any reason in particular you are disabling the buttons on the main form?

      Does pressing the F5 key refresh the browse?

      If so, try eliminating the this.enable() and this.disable(), and adding a sys_send_keys("{F5}") just before the end statement. You could also add one to the 'on activate' for the form.

      I can only intermittingly duplicate the issue here, but have found that the sys_send_keys() seems to work more consistantly that .refresh().

      Craig

      Comment


        #4
        RE: FreshenBrowse Challenge

        Craig,

        Each button's OnPush event script begins with a

        this.disable()

        to prevent the user from inadvertantly running it twice by double clicking.

        This is commonplace. I don't think it's responsible for the behavior of the browse object.

        Your suggestion regarding sys_send_keys() and F5 is one of several I hope to see articulated in this thread.

        --tom

        Comment


          #5
          RE: FreshenBrowse Challenge

          Craig,

          Just now I found that F5 doesn't refresh the browse after a new child record is added, unless the browse object has focus when F5 is pushed.

          F5 will refresh the browse after a child record has been deleted, whether the browse object has focus or not.

          Have not tried coding a solution that will work in all cases. Have you?

          -- tom

          Comment


            #6
            RE: FreshenBrowse Challenge

            You can try this. Sorry, had to get rid of all that action script stuff. Don't have a clue how to use that stuff.

            Comment


              #7
              RE: FreshenBrowse Challenge

              Tom:

              Yes. I have an app that does this extensively. It is too complex to describe easily.

              My app differs in that I use on row double clicks to open the subsequent forms, so the browse has focus on return...

              Craig

              Comment


                #8
                RE: FreshenBrowse Challenge

                Tom:

                I looked back at the app to which I was specifically refering.

                In brief, a company receives a part to be repaired. The part is made up of many components, and many other smaller parts. Each of the smaller parts are made up of components, and even smaller parts.

                The app, based on part number in parent, fills in the primary disassembly matrix when the user clicks in the browse.

                Double clicking on a line with a "part" opens a new form with an empty embedded browse. Clicking on the embedded browse loads THAT parts disassembly matrix.

                As each matrix is completed, closing the form marks the previous forms browse with an "accept" or "reject" and refreshes that browse to reflect the results.

                Hard to explain.

                Anyway, all this required SYS_SEND_KEYS() on several events, based on various possiblilties. .REFRESH and .RESYNCH were inconsistant...

                Looking at the app, I'm thinking that there is no "end all way" for resolving this issue with the browse refreshing. Each would need to be handled on it's own terms. My conclusion was, and is, that SYS_SEND_KEYS was the most reliable method.

                Have you tried browse1.activate() after this.enable() and before the sys_send_keys("{F5}")?

                Craig

                Comment


                  #9
                  RE: FreshenBrowse Challenge

                  not sure how to attach file, but here's one solution to your challenge.

                  Comment


                    #10
                    RE: FreshenBrowse Challenge

                    Steve,

                    Thanks. It's good to see someone else's approach. My sometimes friend, Ignatious A. Pickypicky, says however that you should be disqualified from the challenge. Your data entry occurs through the first form by direct manipulation of the child table, instead of through the called form. Personally, I think your idea is clever, and will be giving it some more thought. I see also that after the child table record is added you fetch_goto()the new record, and then use fetch_prev() to move the row selector to the first position. This is what refreshes the browse object, and is also a useful thing to see. Hmmm, maybe I can get Pickypicky to reconsider.

                    Thanks again.

                    -- tom

                    Comment


                      #11
                      RE: FreshenBrowse Challenge

                      I see also that after the child table record is added you fetch_goto()the new record, and then use fetch_prev() to move the row selector to the first position. This is what refreshes the browse object, and is also a useful thing to see. Hmmm, maybe I can get Pickypicky to reconsider.

                      ------------------------------------------------------

                      Actually, Tom, I have this code in the script to always show the latest child record added. If you continue to add phone numbers beyond the rows contained in the browse, the script will cause the browse to "roll," and display the last line entered.

                      "Win if you can, lose if you must, but always cheat"
                      "They don't ask how you win, they ask did you win"
                      From an unknown source.

                      Comment


                        #12
                        RE: FreshenBrowse Challenge

                        Steve,

                        Ahhh, now I see the logic in looping through the fetch_prev() 6 times. That's the number of rows your browse will show. I wondered where the 6 had come from, and thought maybe you were assuming that no more than 6 phone numbers would be added for each name.

                        thanks for clarifying.

                        -- tom

                        Comment


                          #13
                          RE: FreshenBrowse Challenge

                          Code:
                          Dr. Wayne,
                          
                          Thanks for your entry in the challenge.  Let me see if I can recap your solution for others:
                          
                          1) the browse is refreshed when a phone record is deleted by
                          the OnActivate event script for the form.  In that script yousend an F5 to Alpha Five using sys_send_keys(), and the F5 refreshes the form.
                          
                          2) the browse is refreshed when a phone record is added by the OnPush event of the Save Edits button on the called form.  Looking back to the calling form your script:
                          
                          - gets a pointer to the instance of the set being used 
                            by the calling form
                          - uses that pointer to get a separate pointer to the 
                            primary table in the set, Names
                          - runs a query against the set, using the idnum in the 
                            called form
                          - runs the same query against the names table
                          - resynchs the form
                          - refreshes the browse
                          - runs a query against the set again, but this time with 
                            empty filter and order expressions (this has the effect 
                            of show_all, and does not move the record pointer again, 
                            right?)
                          
                          My sometimes friend, Ignatious A. Pickypicky, would give you only partial credit, because the Add Phone Using Dialog form still does not work.  I'll try to convince him that the same approach used above would work well there, too.
                          
                          Your approach seems like a lot of work, but it would have the advantage of resynching the calling form even if the user managed to enter a new child table record with a different link field value.  This probably isn't necessary here because the link field in the called form is read_only, and navigation is suppressed.   Nevertheless, it's good to see a working solution! 
                          
                          Thanks again.
                          
                          -- tom

                          Comment


                            #14
                            RE: FreshenBrowse Challenge

                            Code:
                            (Let me try to reformat the previous...)
                            
                            Dr. Wayne,
                            
                            Thanks for your entry in the challenge.  Let me see if I 
                            can recap your solution for others:
                            
                            1) the browse is refreshed when a phone record is deleted by
                            the OnActivate event script for the form.  In that script 
                            you send an F5 to Alpha Five using sys_send_keys(), and the 
                            F5 refreshes the form.
                            
                            2) the browse is refreshed when a phone record is added by 
                            the OnPush event of the Save Edits button on the called 
                            form.  Looking back to the calling form your script:
                            
                            
                            - gets a pointer to the instance of the set being used 
                              by the calling form
                            - uses that pointer to get a separate pointer to the 
                              primary table in the set, Names
                            - runs a query against the set, using the idnum in the 
                              called form
                            - runs the same query against the names table
                            - resynchs the form
                            - refreshes the browse
                            - runs a query against the set again, but this time with 
                              empty filter and order expressions (this has the effect 
                              of show_all, and does not move the record pointer again, 
                              right?)
                            
                            My sometimes friend, Ignatious A. Pickypicky, would give 
                            you only partial credit, because the Add Phone Using Dialog 
                            form still does not work.  I'll try to convince him that 
                            the same approach used above would work well there, too.
                            
                            
                            Your approach seems like a lot of work, but it would have 
                            the advantage of resynching the calling form even if the 
                            user managed to enter a new child table record with a 
                            different link field value.  This probably isn't necessary 
                            here because the link field in the called form is 
                            read_only, and navigation is suppressed.   Nevertheless, 
                            it's good to see a working solution! 
                            
                            
                            Thanks again.
                            
                            -- tom

                            Comment


                              #15
                              RE: FreshenBrowse Challenge

                              Heres my spin. I need a life, playing with this on a Saturday night. lol. Thanks Tom!

                              Comment

                              Working...
                              X