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

closing a dialog form

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

    closing a dialog form

    Hi,

    Please remind me how to close a form opened in dialog mode?

    I do have the calling form close it, but when I look in the object editor, it is closed, but in memory! So each time I open it, it adds a number to the end of the name.

    Maybe this isn't a problem - operationally, but it must be taking memory space. I'd just as soon have it out of memory upon closing.

    Thanks

    Tom

    #2
    RE: closing a dialog form

    Tom:

    The dialog form has to be closed by the script which called it in the first place

    '===
    parentform.disable()
    f=form.load("fom", "dialog"
    'do what you need to the form
    form.show()
    'script is waiting for the return here


    parentform.enable()
    f.close()
    'closes the form.
    '===

    Finian
    Finian

    Comment


      #3
      RE: closing a dialog form

      Finian,

      Thanks for your quick response.

      I am closing the form from my calling script, and it does close, since I do not see it when I click on the Window button to see other open forms. But I do see it when I look through the object tool - the wrench when programming.

      And since it is in memory, I am unable to open the table to edit field rules. I found another reference to this problem in doing a search, but no solution.

      How does one got a dialog form out of memory?

      Tom

      Comment


        #4
        RE: closing a dialog form

        Tom,
        Post your script. There has to be a miscoded line which is preventing the dialog from closing. I have miscoded this about 100 times before I finally saw through my mental block.
        Peter
        Peter
        AlphaBase Solutions, LLC

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


        Comment


          #5
          RE: closing a dialog form

          Is it possible that you have both a f.activate() and f.show() after loading the form as dialog? At one point this resulted in 2 copies of the form being loaded, so obviously one would be left after the close. Only the f.show() is needed. However, I think the 2 load form problem was fixed.

          How are you closing the dialog form?

          Finian
          Finian

          Comment


            #6
            RE: closing a dialog form

            Finian,
            I believe if you have:
            f.show()
            f.activate()

            you will get two forms and one will remain in memory.

            If you
            f.activate()
            f.show()

            all will be well.
            Peter
            Peter
            AlphaBase Solutions, LLC

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


            Comment


              #7
              RE: closing a dialog form

              Guys:

              I too have had trouble with dialog method on forms. I've stumbled on the ONLY way I've been able to tell if one is open. That is to try a database compact. I there's an open dialog form, an error message displays like "Hey, you can't compact BlaBla.dbf - do you want to drop it from the database?"

              How are you guys seeing this invisible unclosed dialog form?

              Thanks in advance

              Ken

              Comment


                #8
                RE: closing a dialog form

                Guys:

                I too have had trouble with dialog method on forms. I've stumbled on the ONLY way I've been able to tell if one is open. That is to try a database compact. I there's an open dialog form, an error message displays like "Hey, you can't compact BlaBla.dbf - do you want to drop it from the database?"

                How are you guys seeing this invisible unclosed dialog form?

                Thanks in advance

                Ken

                Comment


                  #9
                  RE: closing a dialog form

                  Ken,

                  Thanks for your response. I too have gotten this message and now that I know what's causing it, I can prevent it from occuring.

                  kenn
                  TYVM :) kenn

                  Knowing what you can achieve will not become reality until you imagine and explore.

                  Comment


                    #10
                    RE: closing a dialog form

                    Ken,

                    Basically, your method (run a database compact) would be the same as any action that requires exclusive access - even:
                    table.open( "XYZ_Table", file_rw_exclusive )

                    The only other way I know of is to go to the Xbasic code editor and open the Xbasic Explorer then open Objects and Windows. This will give you a list of all forms that are still in memory including dialogs that have been "closed". I believe this is the method that Tom Patten was referring to.

                    Cal

                    Comment


                      #11
                      RE: closing a dialog form

                      I use many dialogs and have found that even if the calling script is correct and explicitly closes the dialog, sometimes the dialog stays open. I have spent many hours chasing this problem and have always found an error occuring somewhere on the dialog form. The problem is that a script running on the dialog can have an error and not generate or display the error, but may prevent the form from closing. Check all actions and scripts on the dialog form for errors.

                      Also be aware that some form events don't fire in dialogs, specifically the OnActivate. If you have something on the OnActivate event that is critical, it won't run and will have to be handled a different way. Maybe move it to the OnFetch event.

                      Jerry

                      Comment


                        #12
                        RE: closing a dialog form

                        Another option is to use:
                        :form.dialog("form_name")
                        Although this has a few less features in passing info, it does not need a close statement because when you close the form it closes the form and doesn't hide it.

                        Comment


                          #13
                          RE: closing a dialog form

                          John,
                          form.dialog()
                          I think you just solved a problem for me. I never even thought of using that command. (FWIW: I am loading a dialog from a dialog and have some issues that were causing a problem. So I was using a popup to call the dialog, which worked, but...) I will see if it works.
                          Thanks,
                          Peter
                          Peter
                          AlphaBase Solutions, LLC

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


                          Comment


                            #14
                            RE: closing a dialog form

                            Finian, Peter, Ken(2), Cal, Jerry and John...

                            Thank you all for your suggestions. I've been installing a new computer the last couple of days - but now with lots of ram and speed - I'm ready.

                            I'll be trying all the suggestions mentioned. Much appreciated.

                            Tom

                            Comment


                              #15
                              RE: closing a dialog form

                              Peter,

                              My experience calling a dialog from a dialog is that the first one opened is the only one that is truely modal, regardless of how it was opened. If you can see the first dialog, it is available, you can click on it and get focus. Other functions, like menus, toolbars, and other open forms are still locked. A solution is to hide or disable the first dialog in the script that calls the second. Example: the first dialog opened is "dialog1", the second "dialog2". On the script on "dialog1" that opens "dialog2"

                              parentform.disable()
                              frm = form.load("dialog2","Dialog")
                              frm.show())
                              frm.close()
                              parentform.enable()

                              This seems to work fine.

                              Jerry

                              Comment

                              Working...
                              X