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

Xdialog issue with {condition_begin}

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

    Xdialog issue with {condition_begin}

    OK, I need help. I'm new at using xdialog, but I've jumped in with both feet and now I'm stuck. I trap CTRL-key sequences to toggle radio buttons and check boxes, but when I'm in a field that displays conditionally via {condition_begin} (such as one of the name fields at the top), the cursor disappears as soon as the CTRL-key sequence is pressed, but ui_dlg_ctl_current() indicates the cursor is still in the same field. If the cursor is in another field, it stays put (as I want). There are other issues I can live with and eventually figure out, but this one's vexing. Any help would be greatly appreciated!

    Has anyone else run across this? It appears to be a bug. The script is attached.

    Thanks,
    Eric
    There are three kinds of people in the world: those who can count, and those who can't.

    #2
    Re: Xdialog issue with {condition_begin}

    This is impressive stuff. Really advance for me. Gave me a lot of ideas for my xdialog development. I not entirely sure what you want. My only thoughts here is you may achieve the same goals based on the field event rules. Xdialog field events operate on change, changing, killfocus etc. See help files. You may be able to combine what you do with those. When you use these a_dlg_ctl_goto() function will take you to where you want to go to every time.
    -----------------------------------------------
    Regards
    Mark Pearson
    [email protected]
    Youtube channel
    Website

    Comment


      #3
      Re: Xdialog issue with {condition_begin}

      Thanks, Mark. I've been thinking more and more that my issue is a bug I need to report, so I'll do that. I haven't done anything with field rules, so I'll look into that to see if that helps. I can do all I want within forms and it should work, but I wanted to really learn xdialog and exercise its functionality to see what I could do with it. I still have a very long way to go...
      There are three kinds of people in the world: those who can count, and those who can't.

      Comment


        #4
        Re: Xdialog issue with {condition_begin}

        Where do you expect to see the cursor?
        If you use CTL-2 for instance, it will check the appropriate checkbox. Are you expecting to see it in the 2nd middle?
        If so, you need to add a snippet of code to activate that control.
        I don't see any bugs unless I am missing your question.

        Comment


          #5
          Re: Xdialog issue with {condition_begin}

          Gabriel, thanks for jumping in. Run the xdialog and put the cursor in the first name field. Then, start editing "John" to "Jonathan" but -- then you realize this person has a second middle name, so you interrupt yourself and quickly press 'CTRL-2' to have the second middle name show, and then your cursor disappears.

          I want the cursor to remain so I can finish editing the first name.
          There are three kinds of people in the world: those who can count, and those who can't.

          Comment


            #6
            Re: Xdialog issue with {condition_begin}

            No Eric, it does not disappear. When you click CTL-2, the cursor activates the check box, that is, the focus shifts to the check box. If you want it to go back to the first name, you have to re-activate the first name control.

            Comment


              #7
              Re: Xdialog issue with {condition_begin}

              But... try pressing CTRL-i or CTRL-a, and you'll see the check box for those will toggle but the control is not activated since the cursor remains in the field you are editing. That is the expected behavior, and that is what I want. Pressing the CTRL-key sequence does not activate the check box, from what I can tell.

              Unless I'm missing something...

              And thanks for spending time on this.
              There are three kinds of people in the world: those who can count, and those who can't.

              Comment


                #8
                Re: Xdialog issue with {condition_begin}

                Eric:
                Check THEN UNCHECK each one of these short cuts and see what happens.
                I think what happens with these conditional controls is that alpha refreshes the xdlg based on the condition and thus the focus is lost.

                Comment


                  #9
                  Re: Xdialog issue with {condition_begin}

                  Gabriel,
                  I received a quick response to my bug report from Cian Chambliss and he gave me some ideas to work on. He mentioned that my code is 'hiding' the current control which causes the problem. You are right that the focus is lost. Cian gave me some ideas I'll build upon and try. I'll report back, hopefully with a work around to let me do what I wanted.

                  When you check/uncheck with the CTRL-key sequence, it reverts back and displays correctly. That tells me that somehow A5 thinks there are multiple versions of my name variables due to the {condition_begin} blocks. Food for thought...
                  There are three kinds of people in the world: those who can count, and those who can't.

                  Comment


                    #10
                    Re: Xdialog issue with {condition_begin}

                    Hi Eric,

                    I've had a look and tried to re-focus back to the fname control after pressing Ctrl-F etc.

                    If your cursor is in the First Name and Male is already select and then you press Ctrl-F, as you say the cursor disappears. Then, if you press Ctrl-M to select Male, focus is returned to the fname control. So I can see why you're asking about this... doesn't seem to make sense, but I don't have an answer.

                    I do have a question, however and ask with all humility because it is a great xdialog form... but why XDialog. As said, it's a great form, but so complicated. Could you not achieve the same with a normal form? Just curious as to why you decided on XDialog.

                    I don't do much with it 'cause it's so damn tough but I'd certainly use this form to demonstrate a number of different ideas.

                    And... what were the techniques suggested for getting around this problem?

                    Comment


                      #11
                      Re: Xdialog issue with {condition_begin}

                      David,
                      Great question. Why xdialog? To learn. To be honest, this was my first xdialog and I wanted to see what I could do. A LONG, LONG TIME AGO I was a C/assembly language programmer, so I'm not afraid to jump in to complex things I know nothing about (that was me with xdialog as of the start of last week). I've learned xdialog forms might be quicker to create than regular forms (once you've figured out how to do them!), so my thinking is it will help me create solutions more quickly. And the best way for me to learn is to jump in head first without a safety net.

                      And as to the solution... I'm learning more and I think I jumped in deeper than planned! Apparently using {condition_begin} blocks can 'hide' controls, so I'm now looking at other solutions. I might have a partial solution later this evening. But, I actually think this is productive for me as I'm learning a lot about A5. But it's also possible I've stumbled into a real wall with xdialog on what I want to do here, but that's fine because I know I can do what I want with a form.

                      And for anyone wanting to try out xdialog, the best way is to simply jump in and do a little at a time. I've been working on this for just a week so far.
                      There are three kinds of people in the world: those who can count, and those who can't.

                      Comment


                        #12
                        Re: Xdialog issue with {condition_begin}

                        Well, that makes sense now. With a C/Assembly background you've got what it takes to get through XDialog. I dabled in assembler many, many years ago and just couldn't get it. Looking at XDialog makes my head hurt. I can understand what's written, but to write it... yikes. Thanks for the comments.

                        Comment


                          #13
                          Re: Xdialog issue with {condition_begin}

                          If I could add two cents worth on the value of xdialog instead of forms. If I have to create a new record, I will try to use an xdialog every time. I find it gives greater control over the user's actions. Nothing is saved until you want it to be and if the user walks away because of a dilbert distractionism, no other user is affected by status of the table. xdialog allows you create user workflows consistent with questions you need answered before moving on etc.

                          I find it much more easier to manage the xdialog, than control all the idiosyncracies of tables and fields on forms. that said they require a lot more work on the formatting view side of the house. One of my wish lists is for an xdialog form where you drag and move fields as you desire. The Form does it - VB does it - and quite a few other programs. Just need xdialog to do it.
                          -----------------------------------------------
                          Regards
                          Mark Pearson
                          [email protected]
                          Youtube channel
                          Website

                          Comment


                            #14
                            Re: Xdialog issue with {condition_begin}

                            I'd sure buy into XDialog more if there was an XDialog form. I always see the benefit of it, just need to take time for it.

                            Comment


                              #15
                              Re: Xdialog issue with {condition_begin}

                              This is not very complicated. It's pretty simple matter of fact. When you put a control in the xdlg that is based on a condition, whenever the condition changes alpha has to re-run the xdlg.
                              What does that mean?
                              It means whenever the condition changes the xdlg will re-run and the focus will go back to the object that receives initial focus. That's exactly what's happening but to your eyes it seems that the cursor "disappeared". It didn't, and there are no bugs. It's doing exactly what you are telling it to do.

                              So what's the solution?
                              1-Try an embedded xdlg instead of the conditional objects., or
                              2-Each time you get in a control, send it's name to a variable and when the xdlg reloads make that object the one with the initial focus.

                              Comment

                              Working...
                              X