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

Close all open objects

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

    Close all open objects

    I need exclusive access to a table in order to purge and repopulate it. If a browse or other action is open on that table, my code fails. How can I force all open browses associated with the target table to be closed?

    #2
    Re: Close all open objects

    Take a look at AlphaSports. The main form offers that option when you close it.

    Or in the

    AlphaSports Explained

    in the webhelp.

    If you intended to mean closing down layouts opened by any user on the network, take a look at this on www.learn alpha.com.
    Last edited by Stan Mathews; 03-28-2008, 02:49 PM.
    There can be only one.

    Comment


      #3
      Re: Close all open objects

      A5_CLOSE_ALL_WINDOWS()
      It does what the name implies. You could add that line of code at the start of your script.

      And while you are at it, the proper word in alpha is not purge but: zap, or empty a table.

      Comment


        #4
        Re: Close all open objects

        Connie,

        This is a problem on a network if some workstation has a dialog box on it waiting for a response. To my knowledge there is no way within A5 to force close dialog boxes. Maybe someone will show me the way here...

        Bob Arbuthnot

        Comment


          #5
          Re: Close all open objects

          Bob:
          To my knowledge there is no way within A5 to force close dialog boxes. Maybe someone will show me the way here...
          You can close modeless boxes, but by definition, not modal ones. That said, and also by definition, it is not possible to have more than one Modal box open at a time nor would you be anywhere else if a modal one is open.
          Last edited by G Gabriel; 03-29-2008, 03:05 AM.

          Comment


            #6
            Re: Close all open objects

            I'm re-opening this in case anyone has a solution:

            When I want to shut down an application remotely, I can close any regular form opened 'regularly' - no problem there. However, I cannot close any form opened as "dialog" and I cannot close any xdialog. Anybody know a solution? I'm particularly interested in a solution for xdialogs if possible.

            Please don't provide an answer unless you know it will work with Script_schedule():
            I can create a script that will close a modeless xdialog and using Script_play() it will close. However, using Script_schedule() will NOT close it and Script_schedule() is required in order to close the app remotely.

            Comment


              #7
              Re: Close all open objects

              Hi Cal,

              Originally posted by CALocklin View Post
              I'm re-opening this in case anyone has a solution:

              When I want to shut down an application remotely, I can close any regular form opened 'regularly' - no problem there. However, I cannot close any form opened as "dialog" and I cannot close any xdialog. Anybody know a solution? I'm particularly interested in a solution for xdialogs if possible.

              Please don't provide an answer unless you know it will work with Script_schedule():
              I can create a script that will close a modeless xdialog and using Script_play() it will close. However, using Script_schedule() will NOT close it and Script_schedule() is required in order to close the app remotely.
              I haven't checked the script_schedule() function yet, but clearly both the modeless Xdialogs and the forms opened in dialog mode can be closed from an event in a modeless xdialog box (which can be hidden). By setting a timer event in the modeless XDialog and waiting for a scheduled time, it can fire code when needed that can close the forms and modeless XDialogs and other windows. I am not sure if modal xdialog windows can be closed via this method, but probably can be.

              You can prove just about any of this by trying to close Alpha 5 using the CSDA Code Utility, and it should exit cleanly (except the issue of modal dialogs). It may be possible to close the modals by executing in the timer event of the modeless dialog box, which might grab temporary control away from the modal dialog box.
              Regards,

              Ira J. Perlow
              Computer Systems Design


              CSDA A5 Products
              New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
              CSDA Barcode Functions

              CSDA Code Utility
              CSDA Screen Capture


              Comment


                #8
                Re: Close all open objects

                I figured that out about an hour after my original post - then decided it was time for dinnner. In fact, issuing a ui_modeless_dlg_close() to close the modal dialog actually does work (tested in v8 and v9) and this is ideal in my situation. The user wants to switch between two dialogs during the normal sequence and using modal dialogs keeps the dialog in 'focus' so the user can just hit the Enter key if everything is normal. If I use modal dialogs, the modal dialog loses focus and the user has to grab the mouse instead.

                I still have to test it in the final configuration but I'm pretty sure it will work. Once I've proved it out, I'll post the code.

                Comment


                  #9
                  Re: Close all open objects

                  Hi Cal,

                  Originally posted by CALocklin View Post
                  ...In fact, issuing a ui_modeless_dlg_close() to close the modal dialog actually does work (tested in v8 and v9) ...
                  The above works in all versions 5 and above, probably version 4 too.

                  Originally posted by CALocklin View Post
                  ...If I use modal dialogs, the modal dialog loses focus and the user has to grab the mouse instead.
                  I think you meant modeless in the above sentence. In the timer event, or by using an ondeactivate event (check proper name), you could return focus to the modeless dialog box if desired.
                  Regards,

                  Ira J. Perlow
                  Computer Systems Design


                  CSDA A5 Products
                  New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
                  CSDA Barcode Functions

                  CSDA Code Utility
                  CSDA Screen Capture


                  Comment


                    #10
                    Re: Close all open objects

                    Originally posted by csda1 View Post
                    I think you meant modeless in the above sentence. In the timer event, or by using an ondeactivate event (check proper name), you could return focus to the modeless dialog box if desired.
                    Actually, I did mean "modal" but that was just me being stupid. The only reason it "closed" the modal Xdialog is because it was run within the %code% section of the modal xdialog and there was no a_dlg_button = "" after it to keep the dialog open.

                    I really need to use modal dialogs because modeless dialogs "lose focus" and require the user to grab the mouse to activate the buttons. Most of the time the user can accept the default values and just push the Enter button to accept them. The guys on the line are constantly moving and they'd be upset by anything that took more time. Walking over and pushing the Enter key is much faster than walking over, grabbing the mouse, lining it up with the button, and clicking it. (Some people seem to find that hard to believe but it really is true.)

                    At any rate, I've spent many hours on this so far and I know there is a solution but putting it all together will take some time. Coordinating a shutdown both with and without xdialogs is part of the problem - sometimes an xdialog will be on screen when a shutdown sequence begins; sometimes it won't. I also discovered that scripts initiated by Script_schedule() don't seem to run as long as a [modal?] xdialog is open. This means I can't initiate the shutdown by having the script change a variable - if the script can't run, it can't change the variable. So, I have to run my checks within the xdialog itself and I have to use a file created by the admin to initiate the workstation close. But, the regular script_schedule() must also run because sometimes the xdialogs won't be open. And, the final shutdown must wait for the xdialogs to close first. Fun, fun, fun.

                    However, I don't think I can do anymore tonight. It's getting late and my head is starting to throb so I think it's time to give it up until tomorrow.

                    Comment

                    Working...
                    X