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

Out of memory after opening two simple forms, what gives?

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

    #16
    Re: Out of memory after opening two simple forms, what gives?

    Mike C -- I owe you an apology and recognition for your insights on this problem. I just hope your middle name is Tom!

    Mike W -- Adding the new if statement to the inline XBasic unfortunately does not eliminate the error.

    Here's the action script that failed for the calling button on the parent form:

    Code:
    Inline XBasic: Execute inline XBasic code
      Your code cut and pasted
    Close Window
      Close the window: 'frmTopicItem'
    Then I thought the problem might be that your if statement should execute once the control returns to the parent form, so I tried this:

    Code:
    Inline XBasic: Execute inline XBasic code
      Your code without the if statement cut and pasted
    Inline XBasic: Execute inline XBasic code
       Your code's if statement cut and pasted
    Close Window
      Close the window: 'frmTopicItem'
    The "Out of Memory" error message appears in both cases.

    Bob McGaffic
    Pittsburgh

    Comment


      #17
      Re: Out of memory after opening two simple forms, what gives?

      For a starter, I am not getting out of memory anything even on a laptop with 1Gg of RAM. Must be a v9 issue.

      But I am totally confused as to this little nugget:
      The button that opens the "frmTopicItem" has these AS actions:

      1-Online xbasic:
      Dim LinkDef As C
      LinkDef = "Topic_id = " + s_quote(mTopic_Id)
      Dim p as P
      p = Form.ViewLinked("frmTopicItem", LinkDef, "", "", "dialog", "center", "center")

      2-Then immediately after that: AS action to close "frmTopicItem"

      OK.. you lost me!
      Last edited by G Gabriel; 03-26-2009, 04:48 PM.

      Comment


        #18
        Re: Out of memory after opening two simple forms, what gives?

        Hi G

        Mike C made a resonable suggestion:

        Close the child form window when the [Save+Exit] button is clicked on the child form

        AND

        Close the child form window from the[List] button which called the form.ViewLinked() function.

        In otherwords, close the window twice -- which seems like a reasonable idea but it unfortunately does not eliminate the "Out of memory" error message.

        The best that I can figure out is that the ViewLinked function is hanging, and the ActionScript line to close the child form a second time is not executing.

        The system is unable to leave the ViewLinked function for some reason or another.

        Only when another and different child form is opened on the parent form, does the close the original child window execute and the tab for it at the bottom of the screen disappear.

        Mike Wilson suggested some code that might close the pointer to the ViewLinked function, but I have not got it to work, as described in the post prior to yours.

        Bob McGaffic
        Pittsburgh, PA

        PS: I never had this problem before Saturday 03/21/09, which of course is the day I download A5V9 patches. While I may not have paid attention to whether the form tab was disappearing at the bottom of the screen, I definitely know that I was not receiving the "Out of Memory" error message prior to then.

        Comment


          #19
          Re: Out of memory after opening two simple forms, what gives?

          The form closes just fine. I took out this action, and everything works fine with and without it.

          Even though I am not quite literate nor want to be in the view-linked thing, but what you should do when you open the form (whether this one or any other), check first to see if the form is open. something like:
          if is_object(..form_name..)
          form_name.activate()
          form_name.show()
          else
          ..here use your view-linked thing..
          end if

          This way, you will never have more than one instance of the form open.

          And as far as this view linked thing, I don't know if you have to close the parent first.

          Comment


            #20
            Re: Out of memory after opening two simple forms, what gives?

            Bob,

            I thought I better at least try to help seeing it is my fault you are using form.viewlinked(). However that function is not the problem.
            Using the sample you provided I changed the child form call to

            p=form.view("frmTopicItem","dialog")

            and (although the form is not filtered properly) the same out of memory error condition remains.

            The issue is, as pointed out by Mike, that the frmTopicItem form is opened as dialog and after closing its window the actual form in memory needs to be closed. This can be achieved in this case by simply adding p.close() to the inline xbasic action. I believe the error is coming from trying to close a window that is no longer there. You should not be closing a window (because you have already closed it) but be closing the form in memory.

            So when a form is opened as dialog it sort of needs to be closed twice but the two closures are not the same and are in essence only one closure. The first close, as in a close form action script, only closes the window (hides the form). The form is still open and could be shown ('reopened') with a Show Window action. To actually close the form you need to find it and get a pointer to it. But in this case you already have a pointer to it (p) so that is easy.

            In your sample, in the list button on frmTopic remove all actions but the inline xbasic. To the inline xbasic add the line - p.close()
            In the frmTopicItem form Save button keep only the first two actions- Save record and close form.
            Tim Kiebert
            Eagle Creek Citrus
            A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

            Comment


              #21
              Re: Out of memory after opening two simple forms, what gives?

              Rereading the thread it looks like all I said above has already been said.

              Bob, above you mentioned that MikeC advised to close the form window twice but I think you missunderstood him. He actually said to close the form twice which is what I just described.

              My suggestion to use p.close() is the same as MikeW's except he enclosed it in an If that checks for the pointer still being valid which is more complete and would avoid other errors if for some reason the form got closed on its own. The reason the error persisted is that you were still trying to close a window that was no longer there.

              G's suggestion to first check for an open form is a good one but since you want the form to be in dialog style and any already opened instance of the form might not be then you might want to close any found instances before finally opening the instance you need in this process.
              Tim Kiebert
              Eagle Creek Citrus
              A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

              Comment


                #22
                Re: Out of memory after opening two simple forms, what gives?

                Works just fine in v8. No out of any memory messages.

                By the way:

                if is_object(topparent.this)
                this.close()
                etc..

                Hmmm?

                If it is "this" then it's an object.

                Comment


                  #23
                  Re: Out of memory after opening two simple forms, what gives?

                  Judging by how many threads lately regarding being out of memory and though I didn't read most of them, I wonder if you are really out of memory? or just getting a message to that effect?
                  Have you checked your cpu usage? maybe it's just a bug in v9.

                  Comment


                    #24
                    Re: Out of memory after opening two simple forms, what gives?

                    Bob,
                    You can call me Tom anytime!...to be mistook for either Tom Cone or Tom Baker is very flattering!! :D

                    Tim hopefully made what I was trying to say a bit more clear.
                    Mike
                    __________________________________________
                    It is only when we forget all our learning that we begin to know.
                    It's not what you look at that matters, it's what you see.
                    Henry David Thoreau
                    __________________________________________



                    Comment


                      #25
                      Re: Out of memory after opening two simple forms, what gives?

                      Gentlemen -- all of you!

                      I finally want to report success and document for other quasi-beginners the Action Script in-line XBasic code to successfully open a dialog child form using the form.ViewLinked function. Drum roll please:

                      Code:
                      Dim LinkDef As C
                      LinkDef = "Topic_id = " + s_quote(mTopic_Id)
                      Dim ptr as P
                      ptr = Form.ViewLinked("frmTopicItem", LinkDef, "", "", "dialog", "center", "center")
                      ptr.close()
                      The memory problem has disappeared!!!

                      I am sincerely thankful for the considerable help you all have provided on this issue. But I am also very concerned about the state of completeness of Alpha Five's help.

                      We can only hope that Version 10 includes proper documentation for this significant functionality. Which leads me to the question, how many other neat features does Alpha offer which are similarly "hidden".

                      Bob McGaffic
                      Pittsburgh

                      Comment


                        #26
                        Re: Out of memory after opening two simple forms, what gives?

                        Robert:
                        The only difference I see is that you removed if is_object() from that script.
                        The ptr is not an object and therefore ptr.close() was not executing before.
                        Now it is executing as it should.
                        The help file DOES state that whenever you open a form as a dialog, you MUST use form.close().
                        So, what is missing from the help file?
                        I do not think it is the help file but rather the demonic AS that added this useless piece of code. Or did you do that yourself?

                        Comment

                        Working...
                        X