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

Wait message when copying record in a repeating section

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

    #16
    Re: Wait message when copying record in a repeating section

    The video is showing it published and in Internet Explorer browser.
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

    Comment


      #17
      Re: Wait message when copying record in a repeating section

      Firefox is definitely much faster in adding those records, so the delay becomes more of a non-issue. However, lots of my users have IE, so I want to solve why the message box doesn't show up right away.
      Carol King
      Developer of Custom Homebuilders' Solutions (CHS)
      http://www.CHSBuilderSoftware.com

      Comment


        #18
        Re: Wait message when copying record in a repeating section

        My point is that it shouldn't matter how much javascript there might be going on. Shouldn't the first action of showing the message box happen first, right away, before any other javascript stuff?
        Carol King
        Developer of Custom Homebuilders' Solutions (CHS)
        http://www.CHSBuilderSoftware.com

        Comment


          #19
          Re: Wait message when copying record in a repeating section

          You're running on a UX and you've got 4 in-line actions... on that onClick event... right?

          Running in the debugger this shows that the message is actually being displayed... but I think things are happening so fast that the message is up, the record is copied, and the message is down before you see it.

          It seems that something else, other than the copy is slowing things down... calculations? Something in your UX.

          Anyway... apart from all that... which doesn't help one bit... give this a try. It's cheating... but what the hell.

          This is exactly the same as having four actions with Sync turned on... so you could just change your last action to match what's going on here.

          This is just one action, with all Javascript, running the A5.executeThisThenThat() function... but I'm delaying the close of the message.

          I don't think this is any different that having four actions and Sync checked... but give it a try. It's the setTimeout on the close message that might help.

          I tried using a Container Window for the message, but it had exactly the same effect... no message at all popping up... so I commented it out and put back the A5.msgbox stuff.

          Code:
          function showMessage(){
          //{dialog.Object}.showContainerWindow(this,'CONTAINER_2');
          A5.msgBox.show('Copying Record','<div style=\'padding: 20px;\'>Copying record and checking for alerts. Please wait...</div>','none',function() {});
          }
          
          function copyRec(){
          {dialog.Object}.duplicateRepeatingSectionRow('CONTAINER_1',false);
          }
          
          function setVal(){
          {dialog.Object}.setValue('Weight','10');
          }
          
          function closeMessage(){
          setTimeout("A5.msgBox.hide();",5000);
          //setTimeout("{dialog.Object}.closeWindow('COPYRECORD');",5000);
          }
          
          A5.executeThisThenThat(showMessage, copyRec, setVal, closeMessage);

          Comment


            #20
            Re: Wait message when copying record in a repeating section

            The more I think about it, the more I believe the problem may be in calculations on your UX. The message, copy, setvalue, and message commands are fast. The more records you have, as you've noted, the slower the response... not for the copy, but rather for the UX prep and calcs. It looks like an intense component... could that be it?

            Comment


              #21
              Re: Wait message when copying record in a repeating section

              Hi David, Thanks for chiming in. I tried your suggestions without really accomplishing what I wanted, which was for that message box to immediately pop up when the image was clicked. SO... now I have changed everything and invented a work around so that the click just opens the message box and then does an ajax callback to a function that has all the rest of the javascript in it. And I DO get an instant pop up msg that sits there while the rest of the work is done and then goes away.

              So... I guess this is probably not what gurus would do, but it is doing what I want... see video: http://screencast.com/t/o8pSjwrU

              Click image:
              1st action javascript:
              Code:
              A5.msgBox.show('Copying Record','<div style=\'padding: 20px;\'>Copying record and checking for alerts. Please wait...</div>','none',function() {});
              2nd action javascript:
              Code:
              Ajax callback to an Xbasic function named copyLine
              The Xbasic function:
              Code:
              function copyLine as c (e as p)
              
              dim jc as c
              jc = "{dialog.Object}.duplicateRepeatingSectionRow('CONTAINER_1',false);"
              jc = jc + "{dialog.Object}.setValue('POST_BACKCHARGE','No');"
              jc = jc + "A5.msgBox.hide();"
              copyLine = jc
              
              end function
              Carol King
              Developer of Custom Homebuilders' Solutions (CHS)
              http://www.CHSBuilderSoftware.com

              Comment


                #22
                Re: Wait message when copying record in a repeating section

                That's cool. So what you're doing is delaying the copy etc. by doing a round trip to the server. That allows time for the message to pop up.

                Try this one, if you want to. Not having your UX around I can't tell if it'll work for you... but might as well give it a shot.

                I put this into the onClick event, as Text Mode... not an Action...

                It might do the same thing as your Ajax Callback. It popups up the message right away... then fires every else off a second later. Might save you a trip to the server.

                Code:
                A5.msgBox.show('Copying Record','<div style=\'padding: 20px;\'>Copying record and checking for alerts. Please wait...</div>','none',function() {});
                
                setTimeout(function(){
                	{dialog.Object}.duplicateRepeatingSectionRow('CONTAINER_1',false);
                	{dialog.Object}.setValue('Weight','10');
                	A5.msgBox.hide();
                	},1000);

                Comment


                  #23
                  Re: Wait message when copying record in a repeating section

                  That makes sense, David. I'll try it tomorrow. Would be much easier to use... All in one spot.
                  Carol King
                  Developer of Custom Homebuilders' Solutions (CHS)
                  http://www.CHSBuilderSoftware.com

                  Comment


                    #24
                    Re: Wait message when copying record in a repeating section

                    Is there a difference between putting the code in text mode and putting it as an action? Does something different happen?
                    Carol King
                    Developer of Custom Homebuilders' Solutions (CHS)
                    http://www.CHSBuilderSoftware.com

                    Comment


                      #25
                      Re: Wait message when copying record in a repeating section

                      Another way of doing it would be to use the showwaitmessage method of the dialog object as in
                      Code:
                      var wo = {};
                      wo.useCSSAnimation = true;
                      wo.cssAnimationSettings = {};
                      wo.cssAnimationSettings.size = 16; //set the size of the animation object to 16x16 pixels
                      {dialog.object}.showWaitMessage('container:CONTAINER_1',wo);
                      which was taken straight from the insert method examples. If you put this just before your duplicaterepeatingsectionrow method line it will lock out the repeating container and put a animated circle up for about a second (not sure if you can change the duration or not!)

                      just found this

                      {dialog.object}.waitMessageAutoCloseDelay = 6000 //set time to 6 seconds

                      so you can set the duration of the wait message to suit or there is a {dialog.object}.hideWaitMessage([UXWaitMessageTarget ]) that you could wrap in a setTimeout to close it down after a specific time.
                      Last edited by Lance Gurd; 01-17-2014, 06:05 AM. Reason: found more info

                      Comment


                        #26
                        Re: Wait message when copying record in a repeating section

                        Originally posted by kingcarol View Post
                        Is there a difference between putting the code in text mode and putting it as an action? Does something different happen?
                        No, not that I know of. Maybe save a nano-second of processing in text mode but otherwise the same javascript runs.

                        With Actions you can take advantage of sync processing without having to code it yourself. But, I'm not sure it's needed in this case.

                        Text mode does put everything in one place so that you don't have to move from action to action to see what's going on. Again, for what you're doing the actions were just in-line javascript so there was only one reason to do this... the synchronous option.

                        Comment


                          #27
                          Re: Wait message when copying record in a repeating section

                          Thanks for the info Lance! David, I put your suggested code all in one Inline JavaScript action, and it is working perfectly and eliminates that callback to the server! YAYYYYYY! Thanks! I think I can make good use of this in all kinds of places in my app.
                          Carol King
                          Developer of Custom Homebuilders' Solutions (CHS)
                          http://www.CHSBuilderSoftware.com

                          Comment


                            #28
                            Re: Wait message when copying record in a repeating section

                            Glad it worked out. As it's said... "What happens in the client... stays in the clients" (a little javascript humour... very little). I think using setTimeout is kinda considered cheating... but... sometime you gotta give stuff a little time. It's all executed so fast. Are there are lot of calculations, lookups, etc. going on in your UX?

                            Comment


                              #29
                              Re: Wait message when copying record in a repeating section

                              Yep, there's a bunch of calcs and lookups on that ux. But what wasn't making sense to me was why the wait message wouldn't pop up right away before whatever else needed to be done to copy the line happened. Now it does so all is well.
                              Carol King
                              Developer of Custom Homebuilders' Solutions (CHS)
                              http://www.CHSBuilderSoftware.com

                              Comment

                              Working...
                              X