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

figured out bug after 3 years

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

  • figured out bug after 3 years

    I may be just figuring out something others already knew - but, if you have an embedded browse on a form, and the browse is set to "read only" - because you don't want them to be able to edit it in the browse - and at the "onrowdoubleclick" event you open another form, and close the parent form, you will crash big time. The way around it is to put focus away from the browse before opening the other form - like

    button1.activate()
    form.view("someform")
    parentform.close()

    for 3 years I thought something was wrong with one of my forms, as the only way I could get it to work was by setting a flag and then "pushing" the close button, and if the flag was set - open the 2nd form and close the parent.
    Cole Custom Programming - Terrell, Texas
    972 524 8714
    [email protected]

    ____________________
    "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

  • #2
    RE: figured out bug after 3 years

    Martin

    Thanks for your info. I have not had your problem so far but I will have another look to to make sure what forms are open or not. One problem that I did have was that after double click on the browse, when the requested form opened I was locked onto that one record. If you would like to see that script let me know and I will post it here.

    Keith Hubert
    London.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

    Comment


    • #3
      RE: figured out bug after 3 years

      sure - also check the form you open and check its properties to see if it is filtered for only one record.
      Cole Custom Programming - Terrell, Texas
      972 524 8714
      [email protected]

      ____________________
      "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

      Comment


      • #4
        RE: figured out bug after 3 years

        Martin,

        This does not seem to be a problem in vers 5, beta.

        I've never bumped into it in vers 4 because in similar cases I always leave the original form (the one with the embedded browse) open, while edits are being done in the called form. Avoids the hassle of having to reopen it on return from the called form. However, it means that the display must be refreshed when returning, and that can sometimes be a bit tedious to sort out.

        -- tom

        Comment


        • #5
          RE: figured out bug after 3 years

          that's good news - the reason I have always opted to close the calling form is so that it would be automatically refreshed when I came back - I have never yet found any reliable way to otherwise refresh it. I actually got the idea from you 3 1/2 years ago when you showed me how to get the parent form to always open back to the same customer. The way I now do it is I have a global variable -cnum - and at the onactivate event i say
          if cnum > 0
          parentform.index_set("customer number")
          parentform.find(cnum)
          cnum=0
          end if
          also - if I want the same tab/embedded browse to show as it was when they exited, I use the same idea - I set a global flag to mfph(master form payment history) mfha(master form hearing aids), etc.
          then after the above find routine I say
          if flag1="mfph"
          tabbed1.tab_set(5)
          flag1=""
          end if

          If I can ever find any routine to reliably work otherwise for refreshing child tables, I could often use dialog forms to view and make changes.

          But alas, I have studied and tried all your methods, Dr. Wayne's methods, and any others I saw, but while one will work under a specific set of circumstances, I have found many specific circumstances where none would work.

          thank's for the good news about version 5
          Cole Custom Programming - Terrell, Texas
          972 524 8714
          [email protected]

          ____________________
          "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

          Comment


          • #6
            RE: figured out bug after 3 years

            Gosh, from me? You don't say! It's a bit daunting to think some of my ideas are still in use after all that time. I've made a note of your work around for my permanent files on vers 4. Thanks. -- tom

            Comment


            • #7
              RE: figured out bug after 3 years

              Martin

              Here is the script which takes me to the record on the form I want and the form is not locked on a single record.

              ''XBasic
              dim fm as p
              dim recno as n
              dim rechar as c
              dim response as n
              recno=this:record_number.value
              response=ui_msg_box("Confirm Record Number", "RECORD NUMBER "+str(recno)+chr(13)+"Press OK to Continue or"+chr(13)+"Cancel to Cancel Action",289)

              if response=2 then ui_msg_box(Warning","Action Aborted",16)
              END
              end if
              tbl=table.current()
              query.description="Select Record Number"
              query.filter="record_number=var->recno"
              fm=form.load("Jobs")
              fm:tables:Schedule.query_create()
              fm.resynch()
              fm.show()
              fm.resynch()
              fm.activate()
              fm.show_all()
              END

              Credit to Tom Holt who helped with this.

              Keith Hubert
              London.
              Regards
              Keith Hubert
              Alpha Guild Member
              London.
              KHDB Management Systems
              Skype = keith.hubert


              For your day-to-day Needs, you Need an Alpha Database!

              Comment


              • #8
                RE: figured out bug after 3 years

                Keith - apparently "fr.show_all()" is not releasing the query.
                I will guess the following:
                1. The form "Jobs" is based on a single table, "Jobs"
                2. The record has no unique field that will distinguish itself from other records.
                ---if the record does have a unique identifier it would be much simpler

                define a global variable [dim rnum as n] - you can use this variable in other places, too.
                (I always define my global variable in the autoexec script)

                in your main form, where you have your embedded browse - at the "doubleclick " event put this:
                t=table.get("child table name - like Jobs")
                var->rnum=t.recno()
                form.view("jobs")
                end

                then, at the "onit" event of the form "Jobs" put this:
                t=table.current()
                t.index_primary_put() 'record number order
                t.fetch_find(var->rnum)
                parentform.resynch()

                now, when you PgUp/Dn you should be able to navigate

                hope this helps!
                Cole Custom Programming - Terrell, Texas
                972 524 8714
                [email protected]

                ____________________
                "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                Comment


                • #9
                  RE: figured out bug after 3 years

                  Martin, I do what you do w/o crashing - by making the onrowdoubleclick "popup" be a dialog form. Then the user can't close the calling parent - refresh issues aside.

                  Peter
                  Peter
                  AlphaBase Solutions, LLC

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


                  Comment


                  • #10
                    RE: figured out bug after 3 years

                    yes - but I always close the parent when I edit a child. That way the child is always "uptodate" when I come back.
                    Cole Custom Programming - Terrell, Texas
                    972 524 8714
                    [email protected]

                    ____________________
                    "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                    Comment


                    • #11
                      RE: figured out bug after 3 years

                      Martin,

                      I have also seen the crash you experienced, but I found a slightly different issue with the exact same solution. If I left a form using xbasic with focus still on a readonly browse and then returned to the form, I would get the crash. In this case, the form with the browse was not closed and the next form was not a dialog. Alpha did not like activating a form with focus on a readonly browse. Interestingly, this only happened on one form. Setting focus to any other object before leaving the form solved the problem.

                      Jerry

                      Comment


                      • #12
                        RE: figured out bug after 3 years

                        You can force a resynch when you get back to your browse. I have sets where I load a dialog of a child, enter a new record. The underlying embedded browse remains open and displays the new record hen I close the child table dialog.

                        Peter
                        Peter
                        AlphaBase Solutions, LLC

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


                        Comment


                        • #13
                          RE: figured out bug after 3 years

                          Peter - that is the question of the century - how do you do that - I have tried for hours and hours and hours and hours with different methods - none of which work unless I either manually close the form and/or sometimes I can just manually page forward one parent record and then back

                          examples of what I've tried:

                          from the onrowdoubleclick of an embedded readonly browse

                          f=form.view("some form")
                          'the form may edit and/or enter a new record
                          f.close()
                          browse1.resynch()
                          browse1.fetch_first()
                          browse1.refresh()

                          parentform.recynch()
                          browse1.resynch()


                          parentform.fetch_last()
                          parentform.fetch_first()
                          parentform.index_set("index")
                          parentform.find(therecord)
                          parentform.resynch()
                          browse1.resynch()
                          Cole Custom Programming - Terrell, Texas
                          972 524 8714
                          [email protected]

                          ____________________
                          "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                          Comment


                          • #14
                            RE: figured out bug after 3 years

                            look for the thread from me "refreshing an embedded browse" - it has an example to work with.
                            Cole Custom Programming - Terrell, Texas
                            972 524 8714
                            [email protected]

                            ____________________
                            "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                            Comment


                            • #15
                              RE: figured out bug after 3 years

                              Martin,

                              Here is one example. You can also create an index based upon you set linking expression and do a fetch_find.

                              Peter
                              Peter
                              AlphaBase Solutions, LLC

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


                              Comment

                              Working...
                              X