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

Chainging Button Properties Veeeerrrrry Slow1

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

    Chainging Button Properties Veeeerrrrry Slow1

    I have been working on a project for Motel reservation system wher I want to display in a graphial look which rooms are occupied, with rooms listed vertically and a range of dates listed horizontally.

    The bookings table contains the room and the start and end dates so it is necessary to build the matrix for each unit depicting each day (as opposed to range of days). I have tried verious ways to do this including Crosstab (which does not give me control over cell clicks) and embedded browse on temporary table - which is slow to build for each change of date range.

    Having looked at the meehotel example (elsewhere in forum) I thought that a button based approach , where a grid is made from a series of buttons would be the best and fastest way (since this minimises disk/database retriaval). To this end I painstakingly formulated a grid 14 wide and 10 deep (a total of 140 cells).

    To my suprise populating this grid to set colours and label text would tak over a second on my pentium 4 system. I gasped as i watched each cell draw individually in a manner that reminded me of the Intel 80286 days.

    eg: the same code below
    for i = 1 to 14
    for j = 1 to 10
    s = "B" + alltrim(str(i)) + "_" + alltrim(str(j))
    eval (s + ".fill.forecolor") = "Green"
    ' eval (s + ".text" ) = " "
    next j
    next i

    There must be a beter way to handle this sort of graphical presentation with the performance you would expect from a modern day application.

    Any suggestions greatly appreciated. I have attached my working database.
    Mike Thomson

    #2
    RE: Chainging Button Properties Veeeerrrrry Slow1

    I had a similar problem when using xbasic to change the properties on numerous objects at the same time. It was very slow. You could watch the properties change one object at a time. When viewed by Cian of Alpha, he knew exactly what was happening and made a change a couple of patches back. I believe the problem had to do with actions happening in both the foreground and background threads. The function 'xbasic_synchronous()' included in the xbasic code would correct this problem.

    Now all my forms are fine, even on my old PIII notebook.
    Give this a try.

    eg: the same code below
    xbasic_synchronous()
    for i = 1 to 14
    for j = 1 to 10
    s = "B" + alltrim(str(i)) + "_" + alltrim(str(j))
    eval (s + ".fill.forecolor") = "Green"
    ' eval (s + ".text" ) = " "
    next j
    next i
    Alpha 5 Version 11
    AA Build 2999, Build 4269, Current Build
    DBF's and MySql
    Desktop, Web on the Desktop and WEB

    Ron Anusiewicz

    Comment


      #3
      RE: Chainging Button Properties Veeeerrrrry Slow1

      Definately better (about 3 times better) - but you can still see the draw processm happening

      I cannot see any reference to the xbasic_sychronous() in the help screen or the Xbasic reference - which does make it a bit hard

      Shouldn't there be a way to revert Alpha 5 back after the objects have been updated (eg: an xbasic_asynchronous function)- as I dont know what other things may be affected here

      At any rate this is probably something that needs documenting
      Mike Thomson

      Comment


        #4
        RE: Chainging Button Properties Veeeerrrrry Slow1

        It is still too slow even w. xbasic_synchronous().

        In version 5 it is essentially instantaneous and there is no xbasic_synchronous().
        Peter
        AlphaBase Solutions, LLC

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


        Comment


          #5
          RE: Chainging Button Properties Veeeerrrrry Slow1

          What I'm about to say is from my distant memory at the Alpha conference.

          I had a similar problem. In Alpha 5V5, the changes were instantaneous. In V6, there was a lag. I sat down with Cian and he he saw the problem.

          The following is probably erroneous, but it is how I understood what was happening.

          There are foreground and background threads running. Because of something they did with the code, your code would be evaluated like 72 times instead of once.

          While I was sitting there, Cian changed the source code to V6 and added 'xbasic_synchronous()' to my script. This corrected my problem.

          All I can say is that if you feel something is wrong, submit your code as a bug report, attention Cian. The function 'xbasic_synchronous()' is new and may not be in the help files yet.

          It works fine for me.

          I just downloaded your zip file to look at.

          Ron
          Alpha 5 Version 11
          AA Build 2999, Build 4269, Current Build
          DBF's and MySql
          Desktop, Web on the Desktop and WEB

          Ron Anusiewicz

          Comment


            #6
            RE: Chainging Button Properties Veeeerrrrry Slow1

            As Mike says above, xbasic_synchronous() speeds it up by a factor of 3. But that is still too slow. V5 was much faster. It is an important difference.
            Peter
            AlphaBase Solutions, LLC

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


            Comment


              #7
              RE: Chainging Button Properties Veeeerrrrry Slow1

              I believe that another reason V6 is slower than V5 is that the objects in V6 have many more properties.

              I did try your zip file and 'xbasic_synchronous()' while not instantaneous, was a vast improvement over not using 'xbasic_synchronous()'.

              Ron
              Alpha 5 Version 11
              AA Build 2999, Build 4269, Current Build
              DBF's and MySql
              Desktop, Web on the Desktop and WEB

              Ron Anusiewicz

              Comment


                #8
                RE: Chainging Button Properties Veeeerrrrry Slow1

                I believe that another reason V6 is slower than V5 is that the objects in V6 have many more properties.

                It is hard to believe that is the cause.
                Peter
                AlphaBase Solutions, LLC

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


                Comment


                  #9
                  RE: Chainging Button Properties Veeeerrrrry Slow1

                  Just fooling around, I ran profiler. Unless I'm figuring incorrectly, using xbasic_synchronous() is more than 12 times faster.

                  Script OnPush
                  Line Tot Time Cnt Source
                  ========================================================
                  7 0.000324 2 xbasic_synchronous()
                  8 0.000150 1 FOR i = 1 TO 14
                  9 0.000476 14 FOR j = 1 TO 11
                  10 0.007485 154 s = "B" + alltrim(str(i)) + "_" + alltrim(str(j))
                  11 0.178546 154 eval (s + ".fill.forecolor") = "Green"
                  13 0.005163 154 NEXT j
                  14 0.000376 14 NEXT i
                  ========================================================
                  ========================================================
                  Script OnPush
                  Line Tot Time Cnt Source
                  ========================================================
                  7 0.000152 1 for i = 1 to 14
                  8 0.000476 14 for j = 1 to 11
                  9 0.007808 154 s = "B" + alltrim(str(i)) + "_" + alltrim(str(j))
                  10 2.319032 154 eval (s + ".fill.forecolor") = "Yellow"
                  12 0.006713 154 next j
                  13 0.000379 14 next i
                  ========================================================
                  Alpha 5 Version 11
                  AA Build 2999, Build 4269, Current Build
                  DBF's and MySql
                  Desktop, Web on the Desktop and WEB

                  Ron Anusiewicz

                  Comment


                    #10
                    RE: Chainging Button Properties Veeeerrrrry Slow1

                    You know Peter, all I'm saying is what I was told when I was at the conference.

                    Geez, don't take it out on me!!
                    Alpha 5 Version 11
                    AA Build 2999, Build 4269, Current Build
                    DBF's and MySql
                    Desktop, Web on the Desktop and WEB

                    Ron Anusiewicz

                    Comment


                      #11
                      RE: Chainging Button Properties Veeeerrrrry Slow1

                      Ron,

                      I'm not taking anything out on you.

                      Peter
                      Peter
                      AlphaBase Solutions, LLC

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


                      Comment


                        #12
                        RE: Chainging Button Properties Veeeerrrrry Slow1

                        It's 12X faster, but it's still noticably slower than v5.

                        I'm not picking on you. I'm just hoping that Cian will bestow his compassion on us and get it to where it was in v5.
                        Peter
                        AlphaBase Solutions, LLC

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


                        Comment


                          #13
                          RE: Chainging Button Properties Veeeerrrrry Slow1

                          Mike:
                          Is this what you want?
                          Gabe

                          Comment


                            #14
                            RE: Chainging Button Properties Veeeerrrrry Slow1

                            What I want is for it to be faster
                            But the solutions provided certainly make it better - but not great

                            Mike
                            Mike Thomson

                            Comment


                              #15
                              RE: Chainging Button Properties Veeeerrrrry Slow1

                              Here is a form displaying for 3 clients marked for printing labels - single clicking on any object re-does the screen, letting the operator visually select the first label. In version 5 it is instantaneous. In version 6 you can see each object refresh. In version 6 with 'synchronous' you can barely discern the refresh.
                              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

                              Working...
                              X