Changing a TextEdit to TextEdit to type paswords

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing a TextEdit to TextEdit to type paswords

Germán S. Arduino-2
Hi:

I've a class inheriting from Prompter and all is fully functional. But I
want now transform the "reply" field to a password type-in field.

¿That may be done "mutating"? ¿How?

Any help will be appreciated.

Thanks.
gsa.


Reply | Threaded
Open this post in threaded view
|

Re: Changing a TextEdit to TextEdit to type paswords

Dmitry Zamotkin
PasswordPrompter >> onViewAvailable
        super onViewAvailable.
        replyPresenter view isPassword: true.


Reply | Threaded
Open this post in threaded view
|

Re: Changing a TextEdit to TextEdit to type paswords

Ian Bartholomew-19
In reply to this post by Germán S. Arduino-2
Germán,

> I've a class inheriting from Prompter and all is fully functional. But I
> want now transform the "reply" field to a password type-in field.

Add or edit your Prompters #onViewOpened method so that it sends #isPassword
to the TextEdit ....

MyPrompter>>onViewOpened
    super onViewOpened.
    (self view viewNamed: 'reply') isPassword: true

I hadn't noticed before that the #isPassword aspect is not exposed by
TextEdit - perhaps it should be?


Another way is to alter the code that opens the Prompter. As in

p := MyPrompter
  createOn: String new
  prompt: 'Aaaa'
  caption: 'Bbbb'.
(p view viewNamed: 'reply') isPassword: true.
p showModal

--
Ian

Use the Reply-To address to contact me.
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: Changing a TextEdit to TextEdit to type paswords

Germán S. Arduino-2
Thanks Ian and Dimitry.

"Ian Bartholomew" <[hidden email]> escribió en el mensaje
news:[hidden email]...
> Germán,
>
> I hadn't noticed before that the #isPassword aspect is not exposed by
> TextEdit - perhaps it should be?
>

Exactly. I'm not an expert in Dolphin, just learning, but I've searched the
exposed aspects of the view and not found nothing related to password.

Cheers.
Germán.


Reply | Threaded
Open this post in threaded view
|

Re: Changing a TextEdit to TextEdit to type paswords

Ian Bartholomew-19
Germán,

> Exactly. I'm not an expert in Dolphin, just learning, but I've searched
> the exposed aspects of the view and not found nothing related to password.


It's easy enough to add yourself.  Go to the method

TextEdit class>>publishedAspectsOfInstances

and add

  add: (Aspect boolean: #isPassword);

to the middle of the list.  You should then find that the VC shows the edit
box your new Prompter as having an #isPassword aspect and setting it to true
should have the effect you are looking for.

I don't think #isPassword should work for MultilineTextEdit controls so, for
completeness, you should probably edit it's #publishedAspectsOfInstances
method to #remove the #isPassword aspect.

--
Ian

Use the Reply-To address to contact me.
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: Changing a TextEdit to TextEdit to type paswords

Germán S. Arduino-2
Thanks by the teaching Ian!

I'm wondering were to learn all this hide features of Dolphin (more than
seeing and figuring out reading the image).

Best Regards and Thanks again by the help.
Germán.

"Ian Bartholomew" <[hidden email]> escribió en el mensaje
news:[hidden email]...

> Germán,
>
>> Exactly. I'm not an expert in Dolphin, just learning, but I've searched
>> the exposed aspects of the view and not found nothing related to
>> password.
>
>
> It's easy enough to add yourself.  Go to the method
>
> TextEdit class>>publishedAspectsOfInstances
>
> and add
>
>  add: (Aspect boolean: #isPassword);
>
> to the middle of the list.  You should then find that the VC shows the
> edit box your new Prompter as having an #isPassword aspect and setting it
> to true should have the effect you are looking for.
>
> I don't think #isPassword should work for MultilineTextEdit controls so,
> for
> completeness, you should probably edit it's #publishedAspectsOfInstances
> method to #remove the #isPassword aspect.
>
> --
> Ian
>
> Use the Reply-To address to contact me.
> Mail sent to the From address is ignored.
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Changing a TextEdit to TextEdit to type paswords

Ian Bartholomew-19
In reply to this post by Germán S. Arduino-2
Germán,

I've just put an enhancement request in to ask if the #isPassword aspect can
be added to TextEdit for the Dolphin 6 release.  You never know....

--
Ian

Use the Reply-To address to contact me.
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: Changing a TextEdit to TextEdit to type paswords

garduino
Thanks Ian.