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

Script Help

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

  • Script Help

    The following script, on a form, results in an error: Line 4 - Object method error. A parameter may be incorrect or Misspelled.

    dim frm as P
    t=table.current(2)
    rec=t.recno()
    frm=form.load("Meds_AddMeds","Dialog")'THIS IS THE PROBLEM
    frm.index_set("")
    frm.find(rec)
    frm.activate()
    frm.show()
    frm.close()
    Parentform.resynch()
    END

    I've tried placing a ":" in form as in :form.load.. still no good.

    IF I open other form, and come back, then the script will work correctly.

    Its got me stumped!

    Tom

  • #2
    RE: Script Help

    Tom,

    Is the form Meds_AddMeds based on a set of tables ? Are any of them open when you try to load the form ? Alpha Five won't let you do that. Check the docs for table.open() for the explanation.

    -- tom

    Comment


    • #3
      RE: Script Help

      Hi Tom,

      NO - Meds_AddMeds is a form based on a single table. The table is present as a browse on the calling table, but I use this dialog form to input data - rather than use the browse.

      Another error message I get is, "Object does not support requested interface." Can we use form.load with "Dialog"?

      Tom

      Comment


      • #4
        RE: Script Help

        Tom, yes. There's something else going on. Try shutting down and rebooting. If that doesn't get it, compact your database. If that doesn't get it, upload a copy so we can see it.

        I have working examples of the same sort of thing that follow your model just fine. (Though I precede 'form' with the colon you mention).

        -- tom

        p.s. You HAVE checked the spelling and punctuation of the form name, right? No blank spaces anywhere?

        Comment


        • #5
          RE: Script Help

          No blank spaces... I added back the ":"

          Seems to help if I update the indexes. Once it starts to work, it works dependably. But now it consistently does not work right the first time I enter the form. If I go to other forms and return, it will usually work!! Grrrr.

          Tom

          Comment


          • #6
            RE: Script Help

            Now I've added a button update indexes.

            If I Update indexes, leave the form, and return, all works OK.

            I know this isn't a fix, but it'll have to do until more clues lead to a better fix.

            Tom

            Comment


            • #7
              RE: Script Help

              Tom, you're not calling a dialog form FROM a dialog form, are you ?

              -- tom

              Comment


              • #8
                RE: Script Help

                Nope - but I think the dialog is where the problem is. If I eliminate the dialog, all is well.

                Dialog's are a problem. Leaving a dialog it can be difficult to refresh fields, and now entering is giving me a problem. I think I'll have to figure a work around.

                tom

                Comment


                • #9
                  RE: Script Help

                  This still has me baffled!

                  I find if I change an item in the browse, then save it, the button works fine and will take me to the dialog form to make further changes.

                  Why would the Browse on the parentform, need stimulating before this dialog button would work?

                  Tom

                  Comment


                  • #10
                    RE: Script Help

                    Pardon me again - but I still cannot figure this out.

                    Sometimes the following code works, other times it doesn't. IF it doesn't work, it fails on the first attempt. If it works on the first attempt, it will never fail.

                    I get the message,
                    Script onpush line 6: f = :form.load("Meds_AddMeds","dialog")
                    "Object Method error: A parameter may be incorrect or misspelled."

                    Dim f as P
                    t=table.current(2)
                    rec = t.recno()
                    f = :form.load("Meds_AddMeds","dialog")'PROBLEM IS HERE
                    f.index_set("")
                    f.find(rec)
                    f.activate()
                    f.show()
                    f.close()
                    Parentform.resynch()
                    -------------------------------
                    I've tried
                    1. adding button to default form
                    2. deleting all indexes
                    3. deleting all calc fields
                    4. Emptying the table
                    5. rebuilding the form
                    ...
                    IF I move the form to another directory - I was getting ready to attach the form to this message - It works perfectly!!!

                    Why does changing the directory make a difference?

                    I'm stuck. I'm missing the forest for the trees. or something. Anyone have a "gut" reaction/insight?

                    Thanks much

                    Tom

                    Comment


                    • #11
                      RE: Script Help

                      Tom, have you tried changing the name of the form to a name that's both shorter and does not contain any punctuation ?
                      (I know it shouldn't make any difference, just call me superstitious!)

                      -- tom

                      Comment


                      • #12
                        RE: Script Help

                        By not working what do you mean.Does it not open the form?
                        Does it open the form and not find the desired record?
                        If the second question is true, if you refresh the form does the record pop up?

                        Comment


                        • #13
                          RE: Script Help

                          Tom

                          Yes I did try changing the name of the form.. no good.

                          John - I get the following error message

                          Script onpush line 6: f = :form.load("Meds_AddMeds","dialog")
                          "Object Method error: A parameter may be incorrect or misspelled."

                          If the form opens, it always opens to the correct record. And once it does open, it will continue to open - no problems.

                          If it doesn't open, sometimes it helps to just change an item in the browse, or change forms and come back, or .. any number of things; then when you think you have identified what needs to happen to get by this "freeze", the next time you try it, it doesn't work.

                          Did I mention I deleted all field rules, but to no avail.

                          I'm desparate.

                          Thanks for your suggestions.

                          Tom

                          Comment


                          • #14
                            RE: Script Help

                            PS

                            Just for kicks, I moved the directory to V5 and opened it with V5 and I still get the same error message.

                            Doesn't like the :form.load line?

                            GGGGGGGeeeeeeeeeezzzzzzzzzzzz

                            Tom

                            Comment


                            • #15
                              RE: Script Help

                              Tom

                              I have some ideas which may or may not effect your index issue. By any chance does the dialog enter a child record for a set? Is the dialog called from a form based on the set? Is the child a one to many link with a filtered index expression for the link? Is the same child table linked more than once to the same parent in the set?

                              Under these conditions, I have had some problems keeping indexes uncorrupted. The problem is that with the set open, the linking indexes are locked for that parent record. When a new child is added with xbasic, the indexes don't all update until the set is closed by closing the set form. The only solution I found was to close the set form first, or close and reopen the set form after the save. Clunky, but it works. It may be that an open index is preventing the dialog to either close or reopen. Speculation, but possible.

                              By the way, I have a number of dialogs that open other dialogs and they work without any big hitches. The only problem is that, unlike a single dialog which is modal and prevents access to any other window, when 2 or more are opened in succession, they are not truely modal. All of the dialogs can be accessed, but not the first non dialog form. I get around this by placing each successive form full screen and on top of the previous screen. Again clunky, but workable.

                              Jerry

                              Comment

                              Working...
                              X