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

Refresh a Supercontrol embedded XDialog

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

    Refresh a Supercontrol embedded XDialog

    I have a main menu form with an embedded Xdialog. This form opens when the application is run. This form never closes while the application is running.

    If changes are made to the database from which the embedded Xdialog is getting it�s data, how do I update the embedded Xdialog to reflect those changes? It seems that I have to close the form and reopen the form to refresh the embedded XDialog.

    Thanks,

    Ron
    Attached Files
    Alpha 5 Version 11
    AA Build 2999, Build 4269, Current Build
    DBF's and MySql
    Desktop, Web on the Desktop and WEB

    Ron Anusiewicz

    #2
    Re: Refresh a Supercontrol embedded XDialog

    Hi Ron,
    Sorry, but no solution from me yet....I have run into the same issue. Have tried the only two functions I am aware of (refresh_xdialog... and refresh_targeted....--unsure of exact function names) with no avail.

    So am also interested if a solution can be given for this.
    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


      #3
      Re: Refresh a Supercontrol embedded XDialog

      {AUTO_EXTERNAL_REFRESH}

      This doesn't work/do it?
      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


        #4
        Re: Refresh a Supercontrol embedded XDialog

        Have you tried OnActivate?
        Regards
        Keith Hubert
        Alpha Guild Member
        London.
        KHDB Management Systems
        Skype = keith.hubert


        For your day-to-day Needs, you Need an Alpha Database!

        Comment


          #5
          Re: Refresh a Supercontrol embedded XDialog

          Thanks for your replies.

          In the design of the xdialog, I have an event handler

          Code:
          DIM SHARED vcDueItems as C
          dim text1 as C
          text1 = "Item" + space(89) + "Model" + space(15) + "S/N" + space(42) + "Due Date" + space(10) + "Status"
          auto_list_vcDueItems = table.external_record_content_get("equipment",\
          "Item+'%%'+Model+'%%'+Sn+'%%'+format_data(Date_Due,'6-')+'%%'+status",\
          "Item+Model+Sn",\
          "dtoc(date_due,'1-')<>'' .and. date_due <= date()")
          
          temp_count = w_count(auto_list_vcDueItems,crlf())
          DELETE a_vcDueItems
          DIM a_vcDueItems[temp_count] as c
          a_vcDueItems.initialize(auto_list_vcDueItems)
          
          L1 = auto_list_vcDueItems
          L1=*for_each(tag," "+alltrim(word(tag,1,"%%"))+"{T=4}"+alltrim(word(tag,2,"%%"))+"{T=5}"+alltrim(word(tag,3,"%%"))+"{T=7}"+alltrim(word(tag,4,"%%"))+"{T=8}"+alltrim(word(tag,5,"%%",99)),L1)
              
          'IMPORTANT: Do not change the dialog title.
          ui_modeless_dlg_box(dlgTitle,<<%dlg%
          {background=<Transparent>}
          {font=arial,10,b}
          
          {region}
          {text=168,1text1};;;
          {font=arial,10}
          [%O={@@}%.174,16vP1^#L1!x];
          {endregion};
          
          %dlg%,<<%code%
          
          'Place code here for your event handlers...
          IF a_dlg_button = "x" THEN
              auto_list_vcDueItems = table.external_record_content_get("equipment",\
              "Item+'%%'+Model+'%%'+Sn+'%%'+format_data(Date_Due,'6-')+'%%'+status",\
              "Item+Model+Sn",\
              "dtoc(date_due,'1-')<>'' .and. date_due <= date()")
              DELETE a_vcDueItems
              DIM a_vcDueItems[temp_count] as c
              a_vcDueItems.initialize(auto_list_vcDueItems)
              
              L1 = auto_list_vcDueItems
              L1=*for_each(tag," "+alltrim(word(tag,1,"%%"))+"{T=4}"+alltrim(word(tag,2,"%%"))+"{T=5}"+alltrim(word(tag,3,"%%"))+"{T=7}"+alltrim(word(tag,4,"%%"))+"{T=8}"+alltrim(word(tag,5,"%%",99)),L1)
              
              a_dlg_button = ""
          END IF
          
          %code%)
          I guess what I need is a way to trigger (?) this event handler when the a change is made in the second form, this one is hidden from view, or when the second form is closed and the form with the xdialog is now in view.

          Remember, I'm not closing the first form but simply opened the second form full screen effectively hiding the first form.
          I'm opening the second form using the event 'OnMouseDoubleClick' in a browse which filters the records in the second form. So when the second form closes, I'm still on the first form as before opening the second form. I hope this makes sense.

          Ron
          Alpha 5 Version 11
          AA Build 2999, Build 4269, Current Build
          DBF's and MySql
          Desktop, Web on the Desktop and WEB

          Ron Anusiewicz

          Comment


            #6
            Re: Refresh a Supercontrol embedded XDialog

            If you hide the form, why not close and open it again when the next process is complete?
            What about putting an "on change" event in the susidiary form and doing a behind the scene close and open?
            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


              #7
              Re: Refresh a Supercontrol embedded XDialog

              Hi Ted,

              I been leaning toward that direction.

              The down side is that I will need to write to variables the form's state, what records are selected, what has focus so that when the user returns to that form, nothing has changed except the XDialog.

              In this case, I think it will not be too bad.

              Ron
              Alpha 5 Version 11
              AA Build 2999, Build 4269, Current Build
              DBF's and MySql
              Desktop, Web on the Desktop and WEB

              Ron Anusiewicz

              Comment


                #8
                Re: Refresh a Supercontrol embedded XDialog

                The {auto_external_refresh} does not work for my scenario--help indicates it is only for some controls such as buttons. In my case I delete an external file which is chosen from a checkbox list xdialog....disappears only on a close and reopen.

                Nice to know about this function though--usually use modal xdialogs and was not familiar with it.
                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


                  #9
                  Re: Refresh a Supercontrol embedded XDialog

                  For a button event that is set with a global variable that can be changed outside the xdialog. But how you are going to get a static list to refresh on an embedded xdialog automatically is a challenge. Could a 'refresh' button on the supercontrol be used to redefine the list? Seems in a regular xdialog it can...going to check it out...
                  Robin

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

                  Comment


                    #10
                    Re: Refresh a Supercontrol embedded XDialog

                    Use the function ui_dlg_event().
                    This function takes a dialog title and the event you want to send.
                    The dialog title for an xdialog embedded on a form is the ":" plus the form name plus the control name that holds the xdialog.
                    You can also find this by checking in the view->object explorer menu and looking through the xdialog control properties.(forget which one exactly.)(while the form is in run mode not design mode)
                    So in your case something like ui_dlg_event(":YourFormName:XDIALOG1","x")

                    This will cause an event in that dialog and cause a_dlg_button to contain "x" thereby triggering your event code.

                    You can also play some cool games with this by passing in extra info to the xdialog by including extra values in the event name such as "x_somevalue"

                    Then in the xdialog you can check for
                    Code:
                    if left(a_dlg_button,2) = "x_" then
                        If substr(a_dlg_button,3) = "somevalue" then
                            'do something
                        End If
                    End If

                    You can also use the {watch} command. Check the help on this as it describes close to what you want to do.
                    Don't forget to also look at a5.transaction_counter()
                    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


                      #11
                      Re: Refresh a Supercontrol embedded XDialog

                      a5.transaction_counter()...another obscure function (to me!!) that I had not run across. :-) Thanks Tim!

                      But apparently still nothing except the actual close and reopen that will refresh the list in the xdialog for me. I have also tried to regenerate the list and have it apply with no luck.

                      Ron seems to be ok with the work-around he can use though which is a good thing!
                      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


                        #12
                        Re: Refresh a Supercontrol embedded XDialog

                        Hi Tim,

                        I know I've said this before, but your a genius!!

                        I added the following to my save script on the second form and it works perfectly.

                        Code:
                        ''  update the xdialog on the 'defaults Entry' form
                        ui_dlg_event(":Defaults_Entry:xdialog1","x")
                        Thank you! Thank you! Thank you!

                        Ron
                        Alpha 5 Version 11
                        AA Build 2999, Build 4269, Current Build
                        DBF's and MySql
                        Desktop, Web on the Desktop and WEB

                        Ron Anusiewicz

                        Comment


                          #13
                          Re: Refresh a Supercontrol embedded XDialog

                          Ron,
                          What did you do with this part that is on the main form?

                          if left(a_dlg_button,2) = "x_" then
                          If substr(a_dlg_button,3) = "somevalue" then
                          'do something
                          End If
                          End If
                          Robin

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

                          Comment


                            #14
                            Re: Refresh a Supercontrol embedded XDialog

                            As I understand it, this function when run acts as if it pushes a button on the xdialog and returns the results that you define. If you have an event handler in the xdialog that traps the button push, the event handler is fired.

                            In my case, I do have an event handler which is looking for: a_dlg_button = "x".

                            Code:
                            'Place code here for your event handlers...
                            IF a_dlg_button = "x" THEN
                                auto_list_vcDueItems = table.external_record_content_get("equipment",\
                                "Item+'%%'+Model+'%%'+Sn+'%%'+format_data(Date_Due,'6-')+'%%'+status",\
                                "Item+Model+Sn",\
                                "dtoc(date_due,'1-')<>'' .and. date_due <= date()")
                                DELETE a_vcDueItems
                                DIM a_vcDueItems[temp_count] as c
                                a_vcDueItems.initialize(auto_list_vcDueItems)
                                
                                L1 = auto_list_vcDueItems
                                L1=*for_each(tag," "+alltrim(word(tag,1,"%%"))+"{T=4}"+alltrim(word(tag,2,"%%"))+"{T=5}"+alltrim(word(tag,3,"%%"))+"{T=7}"+alltrim(word(tag,4,"%%"))+"{T=8}"+alltrim(word(tag,5,"%%",99)),L1)
                                
                                a_dlg_button = ""
                            END IF
                            
                            %code%)
                            So in my sictuation, I didn�t have to make any changes to the main form. On the second form, I have a custom save button. The OnPush event contains scripting that does numerous actions when pushed. At the end of the script I added the following code:

                            Code:
                            ''  update the xdialog on the 'defaults Entry' form
                            ui_dlg_event(":Defaults_Entry:xdialog1","x")
                            This was a very simple solution to my problem. I hope this helps.

                            Ron
                            Alpha 5 Version 11
                            AA Build 2999, Build 4269, Current Build
                            DBF's and MySql
                            Desktop, Web on the Desktop and WEB

                            Ron Anusiewicz

                            Comment

                            Working...
                            X