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

conditional object and global script problem

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

    #16
    Re: conditional object and global script problem

    Arlen,

    Not sure what's happening with all the scrips but I find that if I unzip the database into a new folder and run the system it works, but once I get past January I can't stop it.

    If I then try to run the system again I get errors.
    If I then delete the database and unzip it again, I still get errors trying to delete the ihrs.cvs file, but the file is there.

    Where is mo1 etc being dimmed now?

    Comment


      #17
      Re: conditional object and global script problem

      Another quick comment. I've found it inadvisable to use the same name for a table and for a set. They are different things and should have different names.

      Comment


        #18
        Re: conditional object and global script problem

        Tom and David,

        Not sure what is going on with the program for you. I just ran the copy I rezipped and it works for me (except for the problem).

        The variables are dimed on the form (onInit)

        Missing script in autoexec not necessary for this part of the database.

        When I get a chance I will look at the "aproblem" database to see what may not be working for you. I need to leave for awhile so it will probably be this evening or tommorow before I can respond further.

        Comment


          #19
          Re: conditional object and global script problem

          You have done what I don't understand. I'll borrow from Cal Locklin->
          <soapbox>
          I don't understand why people lock down the menus and hide the control panel and make the application innaccessible during developement. I just don't get it. We now have this app to try and sort through an issue, which most of us would like to help out with, but we have all the development needed menus hidden and have to go through the needless addition tasks, apart from trying to figure out the problem, of having to unhide/unlock the app so we have the needed function available to try to figure out the problem. Am I the only one that waits until the moment before deployment to hide and lock everything down? <end soapbox>

          Because it runs fine through the months for me, but errors on a second running, this seems to be a one shot process. I got as far as the script on the Edit Hours button. Aside from the advise that you move all your long and complex scripts from the form buttons to scripts in the Code tab and call them from the button push, because if the form becomes currupt you will loose them all, I think I recognized that the 195 lines of code on this button (lines 6-201) could probably be reduced:

          Later:
          (I thought I understood it and wrote a code to reduce it but I was wrong).
          Last edited by Mike Wilson; 08-12-2010, 05:33 PM. Reason: wrong
          Mike W
          __________________________
          "I rebel in at least small things to express to the world that I have not completely surrendered"

          Comment


            #20
            Re: conditional object and global script problem

            Mike,

            I sincerely appreciate all your comment and work. However, I am a little mystified when you say it is "locked down". I thought everthing was easily accessable.

            In any case I have modified my example (attached) which I think will be easier to run and to understand my problem.

            I haven't had time yet to study your recommendations but will do so tommorrow.

            Comment


              #21
              Re: conditional object and global script problem

              Just some additional comments I forgot to include in my previous post:

              Some of you have said you get error messages when you run this. However, I have run it many, many times and do not get error messages. I wonder what I am doing differently? Also, some have said it works but it still doesn't work correctly for me. Maybe we are looking for different things. Hopefully, the revised app that I just submitted will clarify some of this or maybe I need to do something very differerent with this. I am getting a little concerned that some of you are spending a lot of time and effort looking at this...maybe more than we should.

              Comment


                #22
                Re: conditional object and global script problem

                Arlen, which script or function sets the value in your mo1 and mo2 variables when processing for those months has ended?

                When I run the sequence here the conditionals display correctly but only when all scripts have finished their work. I gather that you're trying to get the conditionals to display in series, as each month's processing is finished. Is that it?

                Comment


                  #23
                  Re: conditional object and global script problem

                  Arlen,
                  Access and available are two different things. I can access my money. I'll have to go to the bank or ATM for that. Available is when it's in my pocket.

                  You have removed all system menus and system toolbars from the forms. To track the path of actions, this requires having to go to the control panel, open the form in design mode to get to the script on the buttons that begin the path of action instead of being able to go directly there from the form. It's like having to go to the bank for the money instead of it being in your pocket. Why hide this stuff during development? It just makes for far more steps to "access" the code.

                  Your code has many nested-subnested scripts, its quite a challenge to run the course. I haven't yet made it to where the mox, mo4, mo5, mo6, etc variables that govern the conditional objects are being set.
                  Mike W
                  __________________________
                  "I rebel in at least small things to express to the world that I have not completely surrendered"

                  Comment


                    #24
                    Re: conditional object and global script problem

                    As reported in my most recent zip file the variables (m01,mo2 etc) are set near the end of the script "repair_hours".

                    I knew that the form displayed the text when the the scripts finished. Yes, Tom, I was trying to get them to display in sequence as each pass through the script was completed.

                    When I first posted this problem I was perhaps a little nieve because I expected someone to spend maybe 10 minutes looking at this and would see I just made some dumb mistake which was easily fixed!

                    One the one hand I am thinking it is not worth all the effort by everyone as the program works perfectly except for this one problem which is just frosting and not critical for the database. On the other hand, I was thinking I could learn more about programing by knowing the answer to this problelm which might be important in a critical situation.

                    Comment


                      #25
                      Re: conditional object and global script problem

                      Arlen,

                      True that your system is a bit tough to get through... so many nested scripts that you need to open and walk through in order to get at the problem, however, that how we see what others are doing and once there it's interesting to try to figure out what the problem is.

                      This one is a puzzler and, so far, best suited to someone who really knows how A5 fires off it's scripts and forms and when and how things get refreshed. It seems that control is never returned back to the form until the end and no matter what kind of refresh is tried it just never gets to the form. Still reviewing.

                      Comment


                        #26
                        Re: conditional object and global script problem

                        Here's a bit of a clue.

                        In the run_report script there is a loop that goes through the months from 1 to 12.

                        I though this might be a good place to refresh stuff. Just like everywhere else, the refresh doesn't get out to the form.

                        If you put in a msgbox statement at this point, after a :background_he:cond1.refresh() then the condition is refreshed.

                        The problem is that the scripts are not allowing information back up the chain and out, while they're running. Interrupting the flow with a msgbox allows refreshes to get out.

                        Comment


                          #27
                          Re: conditional object and global script problem

                          Until a better solution is found I have a bit of a workaround.

                          You could put this anywhere I suppose, but run_repair seems to be a good place.

                          In run_repair, when you start your loop to go through the months...

                          Code:
                          for i=1 to 12
                          	vmonth=word(monthlist,i,crlf())
                          	
                          :background_he:cond1.refresh()
                          :background_he:cond2.refresh()
                          Msgbox("testing", "testing",UI_YES_NO+UI_YES_SELECTED)
                          sys_send_keys("{enter}")
                          Put out a msgbox and then take it down with an "enter". On my system I don't even see the box... but this forces control back out to the form and allows the refresh to take place.

                          However, nothing is without it's price. Because control is returned to the form, the main button is now available again.

                          I would disable this button when the whole process starts and then when it's done, re-enable it.

                          I believe this also causes a little dialog msg box problem that shows up when everything is done, but probably not a big deal since you can test for the existence of a dlg box.

                          The only other change I made was to add mo1=0 etc to the background_he init code to ensure startup values are set.

                          Comment


                            #28
                            Re: conditional object and global script problem

                            the refresh() is working, but it is not getting displayed

                            put cond1.refresh(); xbasic wait_for_idle()
                            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


                              #29
                              Re: conditional object and global script problem

                              Nice... thanks Martin.

                              Comment

                              Working...
                              X