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

msgbox() vs. ui_msg_box()

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

    msgbox() vs. ui_msg_box()

    I am basically lazy and have gotten into the habit of using msgbox() instead of the ui_msg_box() function because it's easier and faster to type. I would like to know if there is any difference and make sure I am not digging myself a hole I won't be able to get out of down the road. In looking at the syntax that pops up when typing msgbox(), only one parameter is required, the title/message. IF that is all that is put in, then it appears as the message with no title on the dialog box. Am I missing some important information here?
    Thanks.
    Ernie

    #2
    Re: msgbox() vs. ui_msg_box()

    Hi Ernie,

    Looks like you pays your money and makes the choice.

    You have the tools to use as you wish. I cant see a deep dark hole here.
    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: msgbox() vs. ui_msg_box()

      Ernie

      Msgbox's syntax is Msgbox(title as c, message as c, box style as n)

      See attached thumbnail.

      This is a down and dirty form of ui_msg_box().

      As Keith said basically - It can't hurt.


      Tom B

      Comment


        #4
        Re: msgbox() vs. ui_msg_box()

        Tom,
        I think Ernie is asking whether one is better than the other....The main difference is that msg_box() only has one required argument with the others being optional ---which basically says that it is a higher lever wrapper for the older ui_msg_box() which required 2 arguments with one optional. Using lower level functions can result sometimes in faster speeds or even more control in how a function acts/reacts. In this case I don't believe there is enough significance to sway one way or another in this regard.
        Mike
        __________________________________________
        It is only when we forget all our learning that we begin to know.
        It's not what you look at that matters, it's what you see.
        Henry David Thoreau
        __________________________________________



        Comment


          #5
          Re: msgbox() vs. ui_msg_box()

          Appreciate the replies. Mike, I had assumed that msgbox() was the older since there are so many ui_...... dialog boxes.
          ....a higher lever wrapper for the older ui_msg_box()......
          So my thinking was, it may not be supported down the line and I'd have to go back and change all "msgbox()" to "ui_msg_box()". I guess this probably won't be a problem.
          Thanks again.
          Ernie

          Comment


            #6
            Re: msgbox() vs. ui_msg_box()

            Hi Ernie, Mike et al,

            Msgbox() is definitely a wrapper for ui_msg_box(), and thus is slower. But as Mike said, it doesn't really matter. However, if you use a variable for the message 2nd argument and it just happens to be blank, then the title parameter is assumed to be the message to display, which is wrong.

            Try it with the following code in the interactive window;
            msgbox("abc")

            msgbox("abc","")

            msgbox("abc","def")

            message="def"
            msgbox("abc",message)

            message=""
            msgbox("abc",message)
            For constants it works as expected, but if a variable is used for the 2nd argument, it depends whether it is blank or not. This could cause unexpected displayed results in this case depending on the variable value.

            I think conceptually the idea for the msgbox() was good, to allow quick displays, but not for regular code. If I had written it, I would have interpreted the parameters depending upon which were given as such
            msgbox(message)
            msgbox(message,boxstyle)
            msgbox(title, message,boxstyle)
            This would not have yielded the same problem.
            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


              #7
              Re: msgbox() vs. ui_msg_box()

              Ira,
              Thanks for taking the time to further explain the msgbox() function. As I have stated earlier, I am basically lazy. I haven't taken the time to figure out how to code xdialog boxes, so I have used AS to design a couple of boxes with color and Ok, Cancel, or just Ok, or Yes No. Then copy the code into a script. Then copy whichever code suites the situation and go in and manually change the message and message box size. Was thinking yesterday how to get variables to display within my messages. Had forgotten about the use of a message variable where it could be built into that. Will look into doing that.
              Thanks again for your help. And, FWIW, I have been looking at your code utility, since I seem to be doing more and more xbasic coding/testing.
              Ernie

              Comment


                #8
                Re: msgbox() vs. ui_msg_box()

                I, on the other hand, have gone the other direction and use neither ui_msg_box() or msgbox() within final code, but instaed use p_msg_box() kindly provided by Bill Parker:

                http://msgboard.alphasoftware.com/al..._msg_box%28%29

                I use msgbox() to display and check values within code as I am writing code because it is simple to type, and remove them at completion, but use a customized version of p_msg_box() for permanent code.
                Mike W
                __________________________
                "I rebel in at least small things to express to the world that I have not completely surrendered"

                Comment


                  #9
                  Re: msgbox() vs. ui_msg_box()

                  Hi Mike,

                  Originally posted by Mike Wilson View Post
                  I, on the other hand, have gone the other direction and use neither ui_msg_box() or msgbox() within final code, but instaed use p_msg_box() kindly provided by Bill Parker:

                  http://msgboard.alphasoftware.com/al..._msg_box%28%29

                  I use msgbox() to display and check values within code as I am writing code because it is simple to type, and remove them at completion, but use a customized version of p_msg_box() for permanent code.
                  That's a good thing to do.

                  Since about September 2008 , I have had my own full replacement for ui_msg_box(), that incorporates ideas from both Cal's and Bill's similar routines, as well as my own enhancements. Some of my own improvements include modeless operation, timeout closing of the box, HTML support, flashing text etc., while maintaining backward compatibility to the standard ui_msg_box().

                  But my main reason for replacing ui_msg_box() (see this thread) is that the timing events of dialog boxes (but not forms) are shut down while the ui_msg_box() is opened. This is really bad, as that means that while the box is opened, any XDialog boxes are totally shut down. Imagine you had an auto-save routine (part of my CSDA code utility as an example). Nothing happens until you close the ui_msg_box(). There are a few other low-level ui built-in functions that act like this as well. I steer clear of any of these.
                  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: msgbox() vs. ui_msg_box()

                    Ira,
                    timed modeless dialogs as apposed to modal dialogs. Sounds intriguing. I seemed to remember another thread a while back in the same vain as the one you referenced with same type of problem where there was something about an administrator of an Alpha application on a network having a heck of a time as there constantly were dialog boxes left open on users machines behind screensavers that locked up the system from being closed down appropriately for updates and maintenance. I'm thinking timed modeless dialogs as you pointed out as potential solution to these types of issues. Yhanks for the reference. A good topic to ponder.

                    This being said... what add_in utility has the capabilities of searching all the applications code for every instance of ui_msg_box() in order to replace with an xdialog variant?.......
                    Last edited by Mike Wilson; 02-17-2009, 12:36 PM.
                    Mike W
                    __________________________
                    "I rebel in at least small things to express to the world that I have not completely surrendered"

                    Comment


                      #11
                      Re: msgbox() vs. ui_msg_box()

                      Hi Mike,

                      Originally posted by Mike Wilson View Post
                      timed modeless dialogs as apposed to modal dialogs. Sounds intriguing..... I'm thinking timed modeless dialogs as you pointed out as potential solution to these types of issues.
                      It's not just modeless dialog boxes, modal dialog boxes can have timers too (and are actually more usefult too)!

                      For those dialog boxes operated in modal modes that return data, like ui_get_list2(), in my enhanced versions, the default value (if any) or the current selection is returned if the box times out, or for those like ui_msg_box(), it returns the default button. I typically show in the status bar the time and a countdown in seconds left, so users have an idea of how long they have to decide. I think I'll add an optional additional time button to allow users who need more time, but eventually it will timeout, which is what is needed in many cases.
                      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

                      Working...
                      X