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

Maximum number of actions attached to button ??

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

    Maximum number of actions attached to button ??

    Hi guys,

    Does anybody know if there is a maximum to the number of actions one can attach to a button ?
    I myself had some problems in the past attaching a large number of operations to a button, and have read about similar problems on this forum as well.

    I wonder if this problem still occurs (v5) or already has been repaired, or if it just concerns operations when attached to the button in a large number or if it also effects large numbers of variables or other commands attached to the button.

    Anybody who wants to share his/hers experience with this?

    Regards,

    Marcel

    #2
    RE: Maximum number of actions attached to button ?

    Hi Marcel,
    If you are using win98 or winME you will have out of memory issue when you write a limited number of codes/scripts. This is due to the fact that these OS types uses system resurces which goes down dramatically as you do many things on your PC. WinXP, Win2000, & WinNT does not have this problem. Even though there exist a limit on the A5 code/script size, you have to really write a whole lot of lines of codes to reach that limit. What Operating system are you using?.

    RAWLINGS

    Comment


      #3
      RE: Maximum number of actions attached to button ?

      Hi,

      I am using XP Home Edition.
      I did not attach pure xbasic code to the button, but action scripting items.
      It seems, that especially a very large number of pre defined operations that you call upon through ONE button (let us say starting at +/- 40 operations) is causing troubles, but it can easely be only my fault as well.

      So hence my question if anybody else experienced this kind of problems and if there were some boundaries experienced.

      Comment


        #4
        RE: Maximum number of actions attached to button ?

        Marcel,

        You might try clicking on the "View X-Basic" button in the action script.

        Next click on the "All Actions" tab of the resulting dialog.

        Scroll to the bottom of the script and place focus on the last line.

        This will tell you how many lines of code the entire script represents.

        Now for the disappointing part...I know that there is a limit on the size of a single X-Basic script, but I don't remember what the limit is.

        I have had a similar problem and solved it by breaking the script into several smaller scripts and called them in order one from another.

        Good Luck

        Louis

        Comment


          #5
          RE: Maximum number of actions attached to button ?

          Well, there is defenitely something the matter with buttons in cases where a large number of actions are attached.
          I get an error message:

          Warning: Error loading: Button: Button17

          To this particular button, about 100 commands were attached, and that seems to be causing problems for Alpha.
          You can create the button, but it simply won't load anymore the next time you load the form.

          It can hardly be a memory problem on the machine scince there is almost 1 Gyg of internal memory available.

          Problem is, that the button can not be changed anymore once the error message appears. If it can't be loaded, it can't be changed as well. So at some point in development, you will just loose the button, which is annoying if you do not have precise information about when this will happen so you can prevent it from happening.

          Regards,

          Marcel

          Comment


            #6
            RE: Maximum number of actions attached to button ?

            I just re-created the button with action scripting, and the same problem occurred: the button could not be loaded anymore in the form.
            Then I restored, created another button, but now converted it into xbasic and after that expanded it to about 100 commands. Now there was no problem detected: the form could still load.

            So my humble and cautious conclusion at this moment would be, that there seems to be an actual limit to the number of actions that can be attached to a button when using action scripting. I have not been abe to determine howmany actions exactly can be attached to a button.
            It seems wise however, to switch to xbasic in case of large numbers of actions attached to a button.

            Kind regards,

            Marcel

            Comment


              #7
              RE: Maximum number of actions attached to button ?

              Marcel

              Action Scripting frquently adds a lot of extra code to a command to cover every possible use of the command. It works fine for relatively simple actions, but putting a large number in one script will add a lot of unneeded code and may result in timing issues and other problems. You haven't mentioned what kind of actions are taking place, but some actions, like operations that open and close tables, have timing issues. For example, if you are appending records to a table and then updating the new table, the append has to complete before the update runs or there is a locking issue.

              With that much code, I would suggest switching to straight xbasic. You can probably remove a lot of unneeded code and can better diagnose where the script begins to run into trouble.

              As far as the allowable size in xbasic, the editor begins to have problems at some point over 2000 lines and 175,000 bytes, which is very large. Actually, longer scripts will run fine, but apparently the editor buffer gets full. For example, you can build 2 of more scripts of that length and have one call another. I have no idea where the limit is there, but it is huge.

              Jerry

              Comment


                #8
                RE: Maximum number of actions attached to button ?

                Jerry,

                Thanks a lot for this explanation.
                At least it brings some understanding of why these problems could have appeared, although I do not think timing issues play a role here, as all the actions where about dimming variables and attaching values to them.
                So, no tables were opened.
                But, nevertheless, it learns me that there a living more people in Rome then Italians.
                I have seen indeed that there is a lot of 'extra' code generated on action scripting. You see it when you convert it to xbasic.
                Nevertheless I do not think the real issue has come up yet.

                Thanks again,

                Marcel

                Comment


                  #9
                  RE: Maximum number of actions attached to button ?

                  Jerry,

                  Your comments were exactly right.
                  I checked the script, and it proved to be over 2200 lines in xbasic. So that probably got the code editor's buffer into problems.

                  So, I devided this into 4 sub-scripts called upon from the main script, and it worked like a charm.

                  I guess, this will also be the cause of the problems using action scripting, as this of course is nothing else as xbasic camouflaged in some way.

                  Regards,

                  Marcel

                  Comment


                    #10
                    RE: Maximum number of actions attached to button ?

                    The xbasic revealed by converting action script(s) is quite nice for studying the mechanics but when needs become "complicated" or more involved, it is time to delve deeper.

                    I examined the print/preview script in the other thread where there was the button problem. It did not take too much effort to pare the script from 672 lines to about 200 merely by eliminating some code duplication. Further reduction to about 100 lines (still fully commented) was easily accomplished by constructing a select..case structure and assigning the report name to be printed to a variable, then having only one set of print or preview commands driven by the chosen report.

                    Without the tables and reports involved I wasn't able to test it. Attached if anyone cares to see.
                    There can be only one.

                    Comment


                      #11
                      RE: Maximum number of actions attached to button ?

                      Thanks Stan.

                      Of course you are right.
                      But at first I thought there was simply a mistake in my code somewhere, so I started checking the code, to conclude at the end I could not find any mistake in it.
                      I never thought there would be a max of about 2000 lines of code to the code editors buffer.
                      So, having read the posting of Jerry, I checked at once to find there were over 2200 lines in my script already, yet being at half the work.....
                      This found, next step would indeed be to reduce the number of lines and split up the script into parts.
                      Which I did, and it works now.
                      I think if there is an actual boundary found here, being the limit of the code editor buffer, this should be mentioned in the database maximums of the Alpha Help File to prevent users from spending hours and hours to search for script errors....
                      I am glad this question has finally been solved. As you can see there were previous postings where the problem was kept hanging in the air.

                      Kind regards and many thanks,

                      Marcel

                      Comment

                      Working...
                      X