Unexpected behaviour of Highline metod ask!

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

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

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

···

On Jun 17, 2009, at 12:10 AM, Buda &amp; Nada wrote: