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

Browse/Hyperlink - Open Form

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

    Browse/Hyperlink - Open Form

    The new Browse Control->Browse/Hyperlinks->Open Form uses the :Form.viewqueried method to call a form to edit a selected record in a browse. In reading the Help on this, I think it requires a <tbl>.Close() method when closing the form.
    Note : If you do not close the form at the end of your script, you will leave the underlying table(s) open.
    The reason I'm bringing this up is I, on several occasions, have tried to do a Backup Database after running this procedure and always get the "<this form's tablename> is in use and can't be backed up" message. This is the only possibility I can come up with at this point. I don't see where the table, the called form is based on, is being closed, unless it's done somewhere internally. Can anyone shed some light on this situation?
    Ernie

    P.S. This is the script it generates:
    Code:
    function Actions_ButtonClick as v( event as C,data as C, row as N)
    	this.Set_Viewport_row(row)
    	if this.Table_Get().Mode_Get() > 0 then
    		this.Commit()
    	end if
    :Form.viewqueried("payments_form",eval("\"Pay_id=\"+s_quote(payments->Pay_id)",this.Name(16)+".this"),"","Dialog","","",.t.)
    browse3.Refresh_Layout()    [COLOR="Red"]<<my code[/COLOR]
    parentform:total_paid.value = vPayments.value  [COLOR="Red"]<<my code[/COLOR]
    parentform:total_paid.refresh()  [COLOR="Red"]<<my code[/COLOR]
    end function

    #2
    Re: Browse/Hyperlink - Open Form

    Hi Ernie,
    The help is referring to when you open a form as a dialog, you must put the form_ptr.close() in the calling script else the form remains in memory when the user closes it. I think the help for Form.load() gives more info.
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

    Comment


      #3
      Re: Browse/Hyperlink - Open Form

      Hi Robin,
      Well, in looking at all the example scripts for "form.viewqueried", they all are opening a form, "doing things...", then have a <frmpointer>.close() at the end. Is this not the same? I am understanding it as saying, the form has to have a specific close() command, not just putting a Close button that closes the form window. In my case, if I call the update form using this method, close the form, then try to backup the database, I get an immediate message saying the the table the form is tied to is in use and cannot be backed up. I will try it on another browse and see what happens. Thanks for your help in this.
      Ernie

      Later: In running my app with the Control Panel tabs visible, I call the form with this method, close the form with a Close button, but the form is still open when I return to the calling form. I am calling it as "Dialog". So, I think, this is, in fact, what is happening. The script seems to need the close() method attached somewhere. This is the sequence of openings:
      1st time, tab says "myform"
      2nd time, tab says "myform0"
      3rd time, tab says "myform1" and continuing on up.
      If I open the form from the control panel, it gets the next "instance number" of the form. I close it out and reopen it from control panel and it gets the same instance. Open it from the embedded browse, it gets that instance. Close, re-open from browse, it's the instance + 1.
      Last edited by enstorms; June 10, 2008, 08:46 PM.

      Comment


        #4
        Re: Browse/Hyperlink - Open Form

        Edit the generated script to close the form.

        Code:
        function Actions_ButtonClick as v( event as C,data as C, row as N)
        	this.Set_Viewport_row(row)
        	if this.Table_Get().Mode_Get() > 0 then
        		this.Commit()
        	end if
        :Form.viewqueried("payments_form",eval("\"Pay_id=\"+s_quote(payments->Pay_id)",this.Name(16)+".this"),"","Dialog","","",.t.)
        browse3.Refresh_Layout()    <<my code
        parentform:total_paid.value = vPayments.value  <<my code
        parentform:total_paid.refresh()  <<my code
        [COLOR="Red"]if is_object("payments_form") then
             :payments_form.close()
        end if[/COLOR]
        end function

        Comment


          #5
          Re: Browse/Hyperlink - Open Form

          Great, Tom. That did it. I couldn't figure out how to get the proper pointer to the table/form. I just submitted a bug report on this. I feel like that should be part of the script that is calling the form.
          Thanks a bunch.
          Ernie

          Comment


            #6
            Re: Browse/Hyperlink - Open Form

            I agree, but only if you opt to open the called form as dialog. The genie should supply the necessary form closing code when the called form is opened as dialog.

            Comment


              #7
              Re: Browse/Hyperlink - Open Form

              Hi,

              The genie should supply the necessary form closing code when the called form is opened as dialog.
              And the Action Script Genie usually does do just that....but not always I find...and it doesn't always work when AS writes it either (too inconsistant to be reproduced for a bug report so far). So in this case I many times resort to redundancy to make sure any dialog form gets closed when opened via a Genie by adding another close script as Tom showed at the very end of my scripts (in AS it would be Window Commands left panel, Close Window right panel). Of course when using xbasic this is a moot point.
              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


                #8
                Re: Browse/Hyperlink - Open Form

                As an update to this issue, this is the fix that Selwyn has made when using this method of calling an update form as a "Dialog".
                P = :Form.viewqueried("payments_form",eval("\"Pay_id=\"+s_quote(payments->Pay_id)",this.Name(16)+".this"),"","Dialog","","",.t.)
                P.CLOSE()
                Thanks to all for your inputs.
                Ernie

                Comment

                Working...
                X