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

hiding a form when creating new record

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

    #31
    Re: hiding a form when creating new record

    In response to Selwyn's last post: So why does it not work in the example I posted? If there's an error in my code, I can't see it. There's hardly any code....!

    Comment


      #32
      Re: hiding a form when creating new record

      I put this code on the button:
      f = form.view("input or view message")
      f.hide()
      f.New_Record() 'this causes the form to show
      f.hide() 'this should cause the form to hide but does not
      sleep (6) 'to make sure you can see it if it is unhidden
      f.close()

      Comment


        #33
        Re: hiding a form when creating new record

        Your code works fine for me.

        I created a new dummy form and put this code on a button:


        f = form.view("customer information")
        f.hide()
        f.New_Record() 'this causes the form to show
        f.hide() 'this should cause the form to hide but does not
        ui_msg_box("","can you see the form? I can't")
        sleep(6) 'to make sure you can see it if it is unhidden
        f.close()

        Comment


          #34
          Re: hiding a form when creating new record

          But try this - the form is clearly visible for the six seconds after the hide() command but before the message box. It only disappears when you generate the m,essage box


          f = form.view("customer information")
          f.hide()
          f.New_Record() 'this causes the form to show
          f.hide() 'this should cause the form to hide but does not
          sleep (6)
          ui_msg_box("","can you see the form? I can't")
          f.close()

          Comment


            #35
            Re: hiding a form when creating new record

            Nick, the sample database you provided works like this on my system - V10.5, last/final build ;

            Click Mesage Input Form
            Select Autolog Message (it takes a while to work for something this simple)
            I see no other screen displayed, however there is a momentary "flash" which could probably be overcome using UI_FREEZE()

            The Message Input Form is still displayed - no second copy, and Input or View Message isn't displayed.

            Have I got the right version of the database?
            See our Hybrid Option here;
            https://hybridapps.example-software.com/


            Apologies to anyone I haven't managed to upset yet.
            You are held in a queue and I will get to you soon.

            Comment


              #36
              Re: hiding a form when creating new record

              Not sure which one you have.
              I think this is the latest. You will see the form stay visible for the six seconds after the hide. Then when the message box appears, the form hides, but not until then.
              Attached Files

              Comment


                #37
                Re: hiding a form when creating new record

                Why did you guys go back to form.view() instead of using form.load() which will stay hidden until you use form.show() or form.activate() to show it? Am I missing something?
                Robin

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

                Comment


                  #38
                  Re: hiding a form when creating new record

                  Sorry Nick, I cannot make it do what you say it does on your PC.
                  Forms don't hide - just the Message Input Form with the single button shows.
                  Would you mind if we started again?
                  I presume- and paraphrasing here.
                  You want an automated data entry into a Table when a Form is selected. This will be the prepopulated Table, and the corresoponding Form will display that data?
                  The data is a specific data set - like User/Auto/Date + other bits and pieces.
                  You don't want to display the PrePop Table at this time, but on a Click Through.
                  Would you have the time to pseudo code what you need to achieve?
                  See our Hybrid Option here;
                  https://hybridapps.example-software.com/


                  Apologies to anyone I haven't managed to upset yet.
                  You are held in a queue and I will get to you soon.

                  Comment


                    #39
                    Re: hiding a form when creating new record

                    OK, clean version here.
                    Open the form called "message input". It has one button. Click on the button. You will see the form "input or view" popup for six seconds. Then selwyn's message will appear and the previous form will hide.

                    Now open the "message input" form in design mode so we can look at the xbasic. Look at the "on push" event. What you will see is the following:

                    f = form.load("input or view message") ...........I changed this to keep MoGrace happy!

                    f.New_Record() .......this causes the form to show even if it had been hidden
                    f.hide() .......this should cause the form to hide but it does not
                    sleep (6)....the form that should have been hidden is visible for the six seconds
                    ui_msg_box("","can you see the form? I can't")....this is Selwyn's message. note that when the message generates the previous form hides
                    f.close()


                    ted - i am not looking for another way to do this. I am just pointing out that there is a bug because the hide statement does not work. What's interesting is that when the message box is generated, the form DOES hide, but not until....
                    Attached Files

                    Comment


                      #40
                      Re: hiding a form when creating new record

                      Have a look at my post about cancelling data changes in a browse if you really want to go nuts!
                      I'll give it a go ma�ana.
                      See our Hybrid Option here;
                      https://hybridapps.example-software.com/


                      Apologies to anyone I haven't managed to upset yet.
                      You are held in a queue and I will get to you soon.

                      Comment


                        #41
                        Re: hiding a form when creating new record

                        Try this - you might not need the hide(), but I didn't test for that.
                        UI_FREEZE(.t.)
                        f = form.view("input or view message")
                        f.hide()
                        f.New_Record() 'this causes the form to show
                        f.hide() 'this causes the form to hide
                        sleep (6)
                        ui_msg_box("","can you see the form? I can't")
                        UI_FREEZE(.f.)

                        f.close()
                        See our Hybrid Option here;
                        https://hybridapps.example-software.com/


                        Apologies to anyone I haven't managed to upset yet.
                        You are held in a queue and I will get to you soon.

                        Comment


                          #42
                          Re: hiding a form when creating new record

                          Yes, that seems to be a workaround! I'll try it in my production system. Thanks....
                          but my original statement is true, the fact that hide() does not work after a new record is opened is a bug (in v9/10, I have not tried it in V11).

                          Comment


                            #43
                            Re: hiding a form when creating new record

                            If at first you don't succeed, Skydiving is not for you!
                            See our Hybrid Option here;
                            https://hybridapps.example-software.com/


                            Apologies to anyone I haven't managed to upset yet.
                            You are held in a queue and I will get to you soon.

                            Comment


                              #44
                              Re: hiding a form when creating new record

                              Nick,
                              the fact that hide() does not work after a new record is opened is a bug
                              It may not a bug see note From Help ...

                              Hidden, Normal
                              This is for advanced users. It opens the form as a normal, (modeless) window, but hides the form so that it is not visible to the user.

                              Even though the form is hidden, it is still in memory and can be referenced by your Xbasic script. You refer to the hidden window by referencing the pointer variable that you specify when opening the Form.

                              Typically, you would open a Form as hidden so that you can manipulate some of the data on the form, or filter/sort the record displayed in the form before you show the form to the user. Once you have done this, then you use the .Activate() method to display the form and give it focus.

                              NOTE: If you use a form method, such as .new_record(), or .fetch_next(), the form will automatically be activated. You will not need to use the .Activate() method

                              Comment

                              Working...
                              X