Unexpected behaviour of Highline metod ask!

B

Buda & Nada

Hi!

I am having an unexpected behaviour when the follwoing code is
executed:

pass = ask("Enter your password: ") { |q| q.echo = "x" }

As I enter characters there is not instantenious echo of the "x"
character. Instead, nothing is echoed until <enter> is hit when all
"x" characters do appear. Is this the intention here. For would
think that "x" characters should after each press of any character.

I would apprecite a commnet.

Bud M
 
A

Axel

In case you don't get a better answer (I've experiences with highline,
but not with 'echo'):

If you are on Windows, maybe it does not work.

If you are on Linux/Unix, do you have everything from the
documentation:

"
echo:
This requires HighLine’s character reader. See the character attribute
for details.

Note: When using HighLine to manage echo on Unix based systems, we
recommend installing the termios gem. Without it, it’s possible to
type fast enough to have letters still show up (when reading character
by character only).
"

-Axel
 
J

James Gray

Hi!
Hello.

I am having an unexpected behaviour when the follwoing code is
executed:

pass = ask("Enter your password: ") { |q| q.echo = "x" }

As I enter characters there is not instantenious echo of the "x"
character. Instead, nothing is echoed until <enter> is hit when all
"x" characters do appear. Is this the intention here. For would
think that "x" characters should after each press of any character.

I would apprecite a commnet.

As Axel pointed out, your platform may matter in this case. Can you
tell us what you are using?

James Edward Gray II
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,438
Messages
2,571,699
Members
48,796
Latest member
Greg L.
Top