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

Question about aestehtics

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

    Question about aestehtics

    When user exits my app, a script is run via the OnExit event. However, the X on the upper right menu bar exits without running this script. I have gotten around this by designing my desktop startup icon with choices checked that tell alpha to not allow max, min on main menu, and to not show this main system menu. This effectively eliminates the min, max, and X buttons on the top right which is what I want. So now all works well in that the user can only exit the app by clicking on my exit buttons, and then I can run whatever scripts I want.

    However, I have run into a problem. When user runs a print preview, these top right buttons appear on the preview screen. When user exits the preview screen, these buttons are now put back on to the main top menu, which I do not want?

    Is this a bug? Or is there something I am doing wrong?

    Or, alternatievely, is there another way to accomplish waht I want to do, i.e., prevent user from exiting without app running my exit script?

    Gary Traub
    Gary S. Traub, Ph.D.


    #2
    RE: Question about aestehtics

    why now use the on_application_exit() function to register the code that you want to run when a5 is exited.

    for example:

    code = "script_play(\"myscript\")"
    on_application_exit(code)


    now, having done that, when the user quits a5, the script "myscript" is run.

    Comment


      #3
      RE: Question about aestehtics

      Thanks Selwyn:

      Yes, that would be even better. Where do I put that code?
      Gary S. Traub, Ph.D.

      Comment


        #4
        RE: Question about aestehtics

        Selwyn:

        I tried putting that code into my autoexec script. It does not do anything. Can you be a little more specific as to what I need to do? Thanks.

        Gary
        Gary S. Traub, Ph.D.

        Comment


          #5
          RE: Question about aestehtics

          this definitely works.

          i test this. i created a script called "register"
          the script had this.


          code =

          Comment


            #6
            RE: Question about aestehtics

            Selwyn:

            I do not at all doubt that your script works. I just don't understand it. Would you please walk me step by step through the process.

            My exit script is called ExitAMA.

            So please tell me exactly what I need to type and where I need to put it. Please .................

            Gary
            Gary S. Traub, Ph.D.

            Comment


              #7
              RE: Question about aestehtics

              i don't understand your question.


              try this.

              go to the interactive window.

              type

              script_play("exitAMA")

              you script should play.

              now do this:

              code = "script_play(\"exitAMA\")"
              ?code

              you will see that code is a string that now contains some xbasic code:
              script_play("exitAMA")

              now do this:

              evaluate_template(code)

              you will see that your script plays again. that's becasue a5 has executed the xbasic that was contained in the variable "code".

              now do this:

              on_application_exit(code)



              now close a5 down.
              does your script play back? it should because the on_application_exit() function registers code to play back.

              does that help?

              Comment


                #8
                RE: Question about aestehtics

                I did everything you said, step by step. But still, the last step, exiting a5, does not bring up my script. I must be missing something.
                Gary S. Traub, Ph.D.

                Comment


                  #9
                  RE: Question about aestehtics

                  see attached example

                  Comment


                    #10
                    RE: Question about aestehtics

                    Selwyn:

                    Thanks for all your help. I will study this example tomorrow and let you know the outcome (I can't seem to download successfully on my home computer tonight - I'll try in the office tomorrow).

                    Thanks again ...

                    Gary
                    Gary S. Traub, Ph.D.

                    Comment


                      #11
                      RE: Question about aestehtics

                      Selwyn:

                      I am still having problems with this. If I create a script called ExitAMA that only has ui_msg_box("success","")
                      and then have another script called "aaa" that has the following:

                      code = "script_play(\"ExitAMA\")"
                      on_application_exit(code)
                      a5.close()

                      Then it behaves as you describe, i.e., when script "aaa" is run, the message "success" appears and then when click ok, a5 closes.

                      However, it does not work with my REAL ExitAMA script which is as follows:

                      ui_beep()
                      dim f as p
                      f=form.load("Exit_AMA","dialog")
                      f.window_position("Center","center")
                      f.show()
                      f.close()

                      Please advise.

                      Gary Traub
                      Gary S. Traub, Ph.D.

                      Comment


                        #12
                        RE: Question about aestehtics

                        the code that is registered in the on_application_exit() script runs after the database has been closed. so you can't have this code open a form, because the form is not there --- the database has been closed already.

                        Comment


                          #13
                          RE: Question about aestehtics

                          Thanks Selwyn for the quick reply. That does bring me back to my original question though. How can I Prevent user from clikcing the top left X and thus exiting the app, therefore bypassing my own exit script. I have tried to address this by setting the desktop icon to not show menu and that eliminates the min, max, and X buttons. But again, that works fine until a print preview is run. At that point, the min, max, and X buttons return, and worse, clicking the X does not even exit a5, it just exits the app and leaves the user staring at the a5 menu.

                          What is your suggestion at this point?

                          Thanks

                          Gary
                          Gary S. Traub, Ph.D.

                          Comment


                            #14
                            RE: Question about aestehtics

                            bump
                            Gary S. Traub, Ph.D.

                            Comment


                              #15
                              RE: Question about aestehtics

                              Gary,

                              In my own work I prefer to show the main menu form for the application, but suppress the 'X' by putting

                              cancel()

                              in the form's

                              CanExit event

                              I leave the Main Menu form open throughout a session. Only way to return to the Windows desktop is by pushing my little close app button on the Main Menu form.

                              Don't know if this will help, but thought I'd mention it.

                              -- tom

                              Comment

                              Working...
                              X