I'm writing a masked edit control.  I want to do various things at
various times.  I want to allow the deletion of certain characters. 
I want to allow editing of certain characters.  All of which is
dependent on the keyboard event/text input, mask, caret index, and
selection begin/end index.  The textInput event works perfectly.  My
issues center around trapping and ultimately rejecting (under
certain cirucmstances) keyboard events for keys such as DELETE,
BACKSPACE, LEFT, RIGHT, etc.  I already have some code to workaround
not being able to cancle the LEFT and RIGHT Keyboard events, but it
doesn't look all that nice (you see the caret move and then move
back). 

Thanks for the suggestions.  However, I don't think what I'm trying
to do is all that unusual.  I've done it in numerous other languages
and I don't think I should have to write excessive amounts of code
to store and restore state when the same thing could be accomplished
by having the appropriate control over the events.  It seems like
either I'm missing something or the language is.  

Thanks again.  The suggestions are greatly appreciated.

-Steven

--- In [email protected], "Chris Velevitch"
<[EMAIL PROTECTED]> wrote:
>
> On 5/19/06, Steven Toth <[EMAIL PROTECTED]> wrote:
> > No dice.  I do see the eventPhase equal to 1 (capture), but the
> > stopPropagation() and stopImmediatePropagation() still do not
> > prevent the DELETE from being processed.  I'm beginning to think
I'm
> > just going about this the wrong way.  There has to be a way to do
> > this.
>
> As I understand it, capture only works for the container containing
> the text field, that is before the target gets it.
>
> And alternative would be to save the state of the text field and if
> the length is zero use the saved state to restore it. I'm assuming
you
> want to prevent all the data from being deleted and but allow it
to be
> edited.
>
>
> Chris
> --
> Chris Velevitch
> Manager - Sydney Flash Platform Developers Group
> www.flashdev.org.au
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to