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

Progress Bar when proccessing data in XBasic

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

    Progress Bar when proccessing data in XBasic

    Can I get a sample how to build progress bar when proccessing data that take a long time in Xbasic?

    I can do A5.msgBox.show then hide it when proccess completed. But sometimes user not patient to wait it and want a progress bar. Thanks!

    #2
    Progress Bar when proccessing data in XBasic

    Can I get a sample how to build progress bar when proccessing data that take a long time in Xbasic?

    I can do A5.msgBox.show then hide it when proccess completed. But sometimes user not patient to wait it and want a progress bar. Thanks!

    edit :I have read this link too , but it doesn't fit my case i think..

    What I need to do, for example :
    Select xx from xxx, and it have 1000 rows
    while flagloop

    ' proccessing data and show progress bar..

    flagloop = rs.nextrow()
    end
    Last edited by ferryk17; 06-06-2016, 06:05 AM.

    Comment


      #3
      Re: Progress Bar when proccessing data in XBasic

      Are you looking. For something to use for a web or windows appliciation. I have something quite nice for use with windows.

      Comment


        #4
        Re: Progress Bar when proccessing data in XBasic

        Hi Paul,

        I looking for web application. I have read this link too , but it doesn't fit my case i think..

        What I need to do, for example :
        Select xx from xxx, and it have 1000 rows
        while flagloop

        ' proccessing data and show progress bar..

        flagloop = rs.nextrow()
        end

        Comment


          #5
          Re: Progress Bar when proccessing data in XBasic

          Can't to my knowledge, xbasic has no 'flush' command to push out data as it's processed.

          Comment


            #6
            Re: Progress Bar when proccessing data in XBasic

            You'd have to break the XBasic processing into chunks... if that's possible. At the end of the 1st part, you send back javascript which updates a progress bar and then fires off another callback with parameters to process the next chunk. At some point you're finished processing and so you send back just a progress bar update. Does mean a few callbacks, though... and not every process is right for it.

            http://youtu.be/vMpK1NrIlCg?hd=1

            Comment


              #7
              Re: Progress Bar when proccessing data in XBasic

              Why not just use preloader gif until ready.

              Comment


                #8
                Re: Progress Bar when proccessing data in XBasic

                Originally posted by Davidk View Post
                You'd have to break the XBasic processing into chunks... if that's possible. At the end of the 1st part, you send back javascript which updates a progress bar and then fires off another callback with parameters to process the next chunk. At some point you're finished processing and so you send back just a progress bar update. Does mean a few callbacks, though... and not every process is right for it.

                http://youtu.be/vMpK1NrIlCg?hd=1
                Thnks David. I have tried this method.

                - dim myend = mystart (ex: start from 1)
                1. Select to my table, for example I have 100 rows.
                2. create array to store my data , for example arr[].id, arr..].itemname
                3. do my proccess with arr[myend].id and arr[myend].itemname
                4. DoCallbackProcess = DoCallbackProcess + "$svs('mydiv','" + myend + " of " +mycount + " records completed...');"
                DoCallbackProcess = DoCallbackProcess + "$('mybar').style.width = '" + percent + "%';"
                5. DoCallbackProcess = DoCallbackProcess + "setTimeout(function(){{grid.Object}.ajaxCallback('G','{Grid.RowNumber}:all','DoCallbackProcess','','start=" + convert_type(myend+1,"C") + "');},100);"
                6. repeat from 1 with myend variable = myend+1
                it's work. But the ajax callback will start from first line again, select all data , create a whole array again although I only need to proccess the arr[myend+1] data. This make xbasic proccess very slow.

                Comment


                  #9
                  Re: Progress Bar when proccessing data in XBasic

                  Originally posted by kkfin View Post
                  Why not just use preloader gif until ready.
                  Ken, you mean something like a5w.messagebox('please wait....') when processing xbasic? I use this method until now. But my client not patient because it doesn't show the actual progress.
                  Last edited by ferryk17; 06-08-2016, 12:55 AM.

                  Comment


                    #10
                    Re: Progress Bar when proccessing data in XBasic

                    Originally posted by [email protected] View Post
                    Thnks David. I have tried this method.


                    it's work. But the ajax callback will start from first line again, select all data , create a whole array again although I only need to proccess the arr[myend+1] data. This make xbasic proccess very slow.
                    Good lord... you're not doing a callback for each row... are you?

                    100 rows... 100 callbacks? That's just a really bad idea.

                    Without doing any of this... how long does your XBasic processing take? I remember re-working some email processing code where the original code was creating array after array of the essentially the same data... over and over and over. Took 20 mintues to process 3,000 rows. Once I finished removing all the crap I had it down to less than 20 seconds... and most of that was communication with the server.

                    So... I hope your example of 100 rows is just that... an example. You should be processing thousands of rows and sending back and message and then processing the next chunk of thousands of rows. Processing 100 rows does not qualify for a record by record progress bar update.

                    Comment


                      #11
                      Re: Progress Bar when proccessing data in XBasic

                      Originally posted by [email protected] View Post
                      Ken, you mean something like a5w.messagebox('please wait....') when processing xbasic? I use this method until now. But my client not patient because it doesn't show the actual progress.
                      I mean animated gif.

                      If your client is only happy with progress bar you can do progress bar totally in client side and replace it with preload gif when your progress bar is in 80-90%. (progress bar has nothing to do with the actual server process)

                      Comment


                        #12
                        Re: Progress Bar when proccessing data in XBasic

                        you could check this out...
                        http://stackoverflow.com/questions/1...-ajax-response

                        However, note that for many processes, it is impossible to even calculate how long it will last or what % is complete.

                        Comment


                          #13
                          Re: Progress Bar when proccessing data in XBasic

                          Originally posted by agillbb View Post
                          you could check this out...
                          http://stackoverflow.com/questions/1...-ajax-response

                          However, note that for many processes, it is impossible to even calculate how long it will last or what % is complete.
                          Thanks Andy, I got a new perspective now. I will not showing the actual proccess percentage.

                          Comment


                            #14
                            Re: Progress Bar when proccessing data in XBasic

                            David,

                            Can you give an example of the javascript you return for the progress bar. I've been trying out a few different types of progress bars, some very simple...

                            Code:
                            var prog = '<div> <progress value="25" max="100"> </progress> </div>';
                            {dialog.Object}.setValue('PROGRESS_PERCENT',prog);
                            and some a little more slick looking....

                            Code:
                            {dialog.Object}.showContainerWindow(this,'WINDOW_1');
                            var prog = '<html><title>Bootstrap Example</title><meta charset="utf-8"><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script><script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script></head><body><div class="container"><div class="progress"><div role=progressbar aria-valuenow  =0 class="progress-bar progress-bar-striped active" aria-valuemin=25 style="WIDTH: 25%" aria-valuemax=100> 25% </div></div></div></body></html>';
                            {dialog.Object}.setValue('PROGRESS_PERCENT',prog);

                            I just haven't gone to the next step of bringing the javascript back from the xbasic function and updating the progress bar. I'm currently just using a window container with a static text box that I'm injecting HTML into. Any suggestions?

                            Andrew

                            Comment


                              #15
                              Re: Progress Bar when proccessing data in XBasic

                              I'd probably do some things a bit differently today, but this still runs nicely. It's using jQuery for the progress bar.
                              Attached Files

                              Comment

                              Working...
                              X