TextPresenter limited to accept N chars

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

TextPresenter limited to accept N chars

Sebastián Sastre
Hi all,

 anybody has made a TextPresenter to accept only N chars? lets say that
for a form you need a field of only 2 digit number or 30 characters
maximum of text input. How is the best form of making this with a
TextPresenter?

thanks,

Sebastian


Reply | Threaded
Open this post in threaded view
|

Re: TextPresenter limited to accept N chars

Ian Bartholomew-21
Sebastián,
> anybody has made a TextPresenter to accept only N chars?

The standard TextPresenter will do that, just set it's #textLimit to the
number of characters...

myTextPresenter view textLimit: N

--
Ian

Use the Reply-To address to contact me (limited validity).
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: TextPresenter limited to accept N chars

Janos Kazsoki
Ian,

can you change it in general at any moment dynamically, or is there a
specific proposed place in the sequence of opening and displaying the
view?

Thank you,
Janos


Reply | Threaded
Open this post in threaded view
|

Re: TextPresenter limited to accept N chars

Ian Bartholomew-21
Janos,

> can you change it in general at any moment dynamically, or is there a
> specific proposed place in the sequence of opening and displaying the
> view?


Can't say I've tried that before but from a quick test it looks dynamic.  In
a workspace evaluate ...

t := TextPresenter show.
t view textLimit: 5.

... and you can enter up to five chars into the TextPresenter before the
beeps.  Now, in the same workspace and without closing the original
TextPresenter,  evaluate,..

t view textLimit: 8

... and you can enter another three characters before it beeps again.

--
Ian

Use the Reply-To address to contact me (limited validity).
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: TextPresenter limited to accept N chars

Janos Kazsoki
Ian,

wow!

It is always annoying to see, how limited my approach is. I haven't
even thought about just trying it in a workspace. A long way... until I
can tell: how limited it has been.

Thank you,
Janos


Reply | Threaded
Open this post in threaded view
|

Re: TextPresenter limited to accept N chars

Sebastián Sastre
In reply to this post by Ian Bartholomew-21
Simple and beauty,

thank you very much,

Sebastian