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

ui_get_password behavior changed by recent patch

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

    ui_get_password behavior changed by recent patch

    Has anyone else noticed that the behavior of ui_get_password was changed in the recent patch? Hitting the "Enter" key no longer checks the password, it just moves the focus to the "OK" button and another "Enter" is required.

    Try it out with this ...

    Code:
    txt = ui_get_password("PASSWORD ENTRY","Type your password.","","*")
    ui_msg_box("","You entered " + txt,ui_attention_symbol)
    it takes "Enter"' twice to get the message.

    I hope this was an unintended change and that the previous behavior (same as V8 and all prior versions) will be restored in a future patch.
    Finian

    #2
    Re: ui_get_password behavior changed by recent patch

    I believe the change was made because using the function in Vista without specifying a character resulted in a character of "null" rather than "*" as it did in XP and earlier. The result was that nothing seemed to be happening when the user typed the password. You can imagine how they would handle that -- IT WORKED, the user just couldn't tell that it was working!

    So, a change is needed but I agree that it would be awfully nice if the old "one keystroke is all it takes" could be returned.

    It would also be nice if we could still specify the character. I know that I have talked with people who set a different character but I have no idea how much of a problem they would consider it if the character were to be changed to "*" - doesn't seem like a big deal to me but I've never bothered to change it. HOWEVER, if this is now done with xdialog, I don't believe the %p% option allows any character other than "*".

    Hours later:

    I couldn't take it. I knew it could be done so here's a function that I created a year or two ago and updated today so that it is more compatible with ui_get_password().

    (Sorry Selwyn, this doesn't take you off the hook:). It would still be best if this was built in so users who are updating their apps don't have to do anything to make them work correctly. I suspect you are just missing the '*' next to the OK button.)

    It seems to work as a direct replacement for ui_get_password() - including one press of the 'Enter' key to accept the password. There are two exceptions: (1) it also doesn't allow other password characters and (2) if you use a default password (why would anyone do that??), the cursor will be at the end of the default password rather than highlighting the whole password. Since I can't see any reason to use a default password, I don't think this will be a big issue.

    If you want to use it in your own application to replace ui_get_password(), I believe you could just change the name to ui_get_password and add it to your code tab.

    This function also allows you to enter very long prompts and even works with no arguments at all. I also added a 5th argument in case you don't like the width of the prompt.

    Code:
    'Date Created: 01-Jun-2008 05:06:10 PM
    'Last Updated: 01-Jun-2008 06:20:36 PM
    'Created By  : Cal
    'Updated By  : Cal
    FUNCTION AIMS_Get_Password as C ( Title="PASSWORD" as C, Prompt="Enter Password:" as C, Default_password="" as C, Pswd_char="*" as C, Prompt_width=50 as N )
        'Description:Similar to ui_get_password() but allows for multiple lines of text. The Pswd_char argument is for backward compatibility only - it is always '*' now.
        IF Title = ""
            Title = "PASSWORD"
        END IF
        IF Prompt = ""
            Prompt = "Enter Password:"
        END IF
        IF prompt_width < 20
            prompt_width = 20
        END IF
        password = Default_password
     
        dlg_text = <<%dlg%
    {ysize=.3}{sp};
    {on_key=ESC}{wrap=[[prompt_width]]}
    {region}
    [[text_in]];{sp};
    {initial_focus}[%p%.[[prompt_width]],1password];
    {endregion}{sp}
    {region}
    <*10OK>;{sp};
    <10Cancel>
    {endregion}
    %dlg%
     
        dlg_text = stritran( dlg_text, "[[text_in]]", Prompt )
        dlg_text = stritran( dlg_text, "[[prompt_width]]", ltrim(str(prompt_width)) )
     
        DIM dlg_result as C
        dlg_result = ui_dlg_box( title, dlg_text )
     
        IF dlg_result = "OK"
            AIMS_Get_Password = password
        ELSE
            AIMS_Get_Password= ""
        END IF
     
    END FUNCTION
    Here's some code to test it with:
    Code:
    msg = "This can be a really, really, really long prompt that takes many lines to be shown on "
    msg = msg + "the dialog and the longer you make it, the taller the dialog box gets.  In case "
    msg = msg + "you didn't get it the first time, this can be a really, really, really long prompt "
    msg = msg + "that takes many lines to be shown on the dialog and the longer you make it, the "
    msg = msg + "taller the dialog box gets."
    pswd = AIMS_Get_Password( "", msg, "", "", 72 )
    ui_msg_box( "PASSWORD RETURNED", pswd )
    I have another version that forces the user to enter a password or press 'Cancel' to quit but the logic is much more contorted. Since this isn't the way ui_get_password() works and the logic is tough to follow, I opted not to post it. Getting the Enter key to work AND show the warning prompt if no password was entered turned out to be quite a problem. Without the "contortions", pressing the Enter key to close the warning prompt just brought the warning prompt back up. It was as though the Enter key was pressing both the OK for the warning and the OK for the password xdialog at the same time. When this happened, the only solution was to use the mouse. For some reason, the mouse worked but pressing the Enter key didn't.

    Comment


      #3
      Re: ui_get_password behavior changed by recent patch

      When I'm prompted for a password by the database (i.e. the dialog box that I don't control) I don't have to hit enter twice. I enter the password, hit enter and I'm done. Does it seem unreasonable to expect ui_get_password to perform the same way?

      Yes, I know I can write my own xdialog to do want I want but why should I have to when it's demonstrably possible to have the behavior stay the same.

      And if the reason is, in fact, Vista then why can't it just check for Vista and address the issue that way. Why introduce pointless keys for everyone else? That. for certain, is what my users will say.

      It's a simple concept, you don't change something that has behaved the same way for what, 10 years? You make it work the same. That's what my users expect me to do.
      Finian

      Comment


        #4
        Re: ui_get_password behavior changed by recent patch

        I too would appreciate the return of hitting enter only one time instead of twice. My users are complaining about this already. I know this can be something they get used to but I don't want that. Especially if it does get changed back to hitting enter ONCE, then they might hit enter twice out of habit and enter on somthing they shouldn't.

        Is this something that can be done in the next patch or are we to get used to it this way?

        Nicki

        Comment


          #5
          Re: ui_get_password behavior changed by recent patch

          Originally posted by NICKI004 View Post
          I too would appreciate the return of hitting enter only one time instead of twice. My users are complaining about this already. I know this can be something they get used to but I don't want that. Especially if it does get changed back to hitting enter ONCE, then they might hit enter twice out of habit and enter on somthing they shouldn't.

          Is this something that can be done in the next patch or are we to get used to it this way?

          Nicki
          it is fixed. will be in next patch

          Comment


            #6
            Re: ui_get_password behavior changed by recent patch

            Thank you Selwyn.
            Finian

            Comment


              #7
              Re: ui_get_password behavior changed by recent patch

              Here's a minor fix to my previously posted script.

              Change the line:
              [[text_in]];{sp};

              to:
              {'[[text_in]]};{sp};

              Without that you can't use parenthesis, square brackets, etc. in the prompt.

              Also, it appears that the latest version has broken the ui_get_password() function again. It seems to be back to where it won't work with the Enter key again.

              Comment


                #8
                Re: ui_get_password behavior changed by recent patch

                Originally posted by CALocklin View Post
                Here's a minor fix to my previously posted script.

                Change the line:
                [[text_in]];{sp};

                to:
                {'[[text_in]]};{sp};

                Without that you can't use parenthesis, square brackets, etc. in the prompt.

                Also, it appears that the latest version has broken the ui_get_password() function again. It seems to be back to where it won't work with the Enter key again.



                i just confirmed that ENTER does work to close the dialog, but only if a default value was passed in.

                in any event, it is fixed now. will be in next update.
                Last edited by Selwyn Rabins; 06-22-2008, 08:18 PM.

                Comment


                  #9
                  Re: ui_get_password behavior changed by recent patch

                  Deleted. Selwyn's updated post resolves the issue.
                  Last edited by CALocklin; 06-22-2008, 09:24 PM.

                  Comment

                  Working...
                  X