[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby gem highline problem

sujeet kumar

6/22/2005 10:17:00 AM

Hi
I want to take some data at runtime from user and want data to be
not seen by others. I used
"password = ask("Enter your password: ") { |q| q.echo = "*"} " to
take password from user in console(he types password in console) . Now
I want to take password from TkEntry and want that it too should be
echoed in TkEntry.
What should I do?
thanks
sujeet


2 Answers

James Gray

6/22/2005 12:57:00 PM

0

On Jun 22, 2005, at 5:17 AM, sujeet kumar wrote:

> Hi
> I want to take some data at runtime from user and want data to be
> not seen by others. I used
> "password = ask("Enter your password: ") { |q| q.echo = "*"} " to
> take password from user in console(he types password in console) . Now
> I want to take password from TkEntry and want that it too should be
> echoed in TkEntry.
> What should I do?

I fear the subject of your message is a little misleading. HighLine
can't help you with this, you need a TK guru to offer a suggestion...

James Edward Gray II


Guillaume Marcais

6/23/2005 2:00:00 AM

0

Le 22 juin 05, à 08:56, James Edward Gray II a écrit :

> On Jun 22, 2005, at 5:17 AM, sujeet kumar wrote:
>
>> Hi
>> I want to take some data at runtime from user and want data to be
>> not seen by others. I used
>> "password = ask("Enter your password: ") { |q| q.echo = "*"} " to
>> take password from user in console(he types password in console) . Now
>> I want to take password from TkEntry and want that it too should be
>> echoed in TkEntry.
>> What should I do?
>
> I fear the subject of your message is a little misleading. HighLine
> can't help you with this, you need a TK guru to offer a suggestion...
>
I am no Tk guru, but I'll make a suggestion:

TkEntry.new {
show "*"
pack
}

should do what you. Have a look at 'man n entry' to see all the options
available for the entry widget.

Hope it helps,
Guillaume.