Masked Edits and Formatting: A Simple Phone Number Formatting Strategy

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

Masked Edits and Formatting: A Simple Phone Number Formatting Strategy

Eric Taylor
Hello Forum,

I have a few questions concerning masked edits and user input formatting.

In many development environments, masked edits and/or the formatted display
of user input is handled using a "picture" metaphor.  For example, a phone
number field in a view might have associated with it a picture of the form
"(###) ###-####", or some variation on this theme.  The picture will usually
serve the dual purpose of controlling input (masked edit) and formatting
output.

I searched the news archives, as well as the Dolphin framework and online
help, and didn't quite turn up anything that hits the mark.  The format:with:
family of messages come close, but exploration of those leads me to a Win32
API call that is placeholder-based, not picture-based.

What is the Dolphin community doing to handle such situations?  Ted Bracht's
book addresses the situation where the input involves a date, but not other
forms of data, such as a phone number, social security number, etc.

Thanks very much.

Cheers,

Eric


Reply | Threaded
Open this post in threaded view
|

Re: Masked Edits and Formatting: A Simple Phone Number Formatting Strategy

Janos Kazsoki
Hi Eric,

this is what I have found:

Open the View Composer, create a default Shell view, drop onto it a
TextFields/TextPresenter Masked Edit.

Now among the Aspects you find: controlDispatch= an IMSMask, and in
that click on Format=''. You'll see some formatting examples. There is
also a Mask there.

I hope this helps (at least to begin with the search),
Janos


Reply | Threaded
Open this post in threaded view
|

Re: Masked Edits and Formatting: A Simple Phone Number Formatting Strategy

Eric Taylor
Hello Janos,

Thanks for the tip!  I can't believe I missed "TextPresenter Masked Edit."
 That's exactly what I was looking for.  It would seem that all I have to
do is add a format spec for a phone number, or whatever, to the list of formats
available.  Very elegant.

Thanks very much.

Cheers,

Eric

> Hi Eric,
>
> this is what I have found:
>
> Open the View Composer, create a default Shell view, drop onto it a
> TextFields/TextPresenter Masked Edit.
>
> Now among the Aspects you find: controlDispatch= an IMSMask, and in
> that click on Format=''. You'll see some formatting examples. There is
> also a Mask there.
>
> I hope this helps (at least to begin with the search), Janos
>