is not cancelable, so I cannot prevent the keystrokes. For example,
I'm using a TextInput control. I can handle the textInput event and
cancel it (not allow the new text to be input) using the
prevenDefault() method. However, the keyDown and keyUp events are
not cancelable. Hence I cannot prevent my user from deleting text
from the control via the DELETE key. The stopPropagation() and
stopImmediatePropagation() method do not work since the event has
already been processed and the text deleted by the time it gets to
the keyDown and keyUp events. It seems that there must be someway
to be able to reject or respond in a custom way to keyDown/keyUp
events???
--- In [email protected], "Michael Schmalle"
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Well, looking at how Adobe did somethings, I would say you could
either
> write a filter loop that executes in the keyDown handler or just
hard code
> the keys you want to reject.
>
> I don't know if this helps you but, there is;
>
> keyEvent.stopPropagation()
> keyEvent.stopImmediatePropagation()
>
> See the docs for the lengthy definition of those methods.
>
> Being email and all it sounds like you just need to do alittle
ditch digging
> ;-) IE put in an if statement with logical || .
>
> Peace, Mike
>
> On 5/18/06, Steven Toth <[EMAIL PROTECTED]> wrote:
> >
> > I'm trying to write a custom control and I need to be able to
reject
> > certain keystrokes. I'm able to add listeners for the
KeyBoardEvent,
> > but they are not cancelable. I don't see anywhere in the object
> > heirarchy that they are. I'm probably missing something since
I'm
> > approaching this from a perspective of developing similar
controls
> > in .NET and Java. Is handling the KeyboardEvent the correct way
to do
> > this? If so, how do I handle the event so that I can cancel
it? If
> > not, what should I be doing so I can reject certain keystrokes?
> > Thanks.
> >
> >
> >
> >
> >
> > --
> > 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<http://groups.yahoo.com/gads?
t=ms&k=Web+site+design+development&w1=Web+site+design+development&w2=
Computer+software+development&w3=Software+design+and+development&w4=M
acromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=L
-4QTvxB_quFDtMyhrQaHQ> Computer
> > software development<http://groups.yahoo.com/gads?
t=ms&k=Computer+software+development&w1=Web+site+design+development&w
2=Computer+software+development&w3=Software+design+and+development&w4
=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig
=lvQjSRfQDfWudJSe1lLjHw> Software
> > design and development<http://groups.yahoo.com/gads?
t=ms&k=Software+design+and+development&w1=Web+site+design+development
&w2=Computer+software+development&w3=Software+design+and+development&
w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.s
ig=1pMBCdo3DsJbuU9AEmO1oQ> Macromedia
> > flex<http://groups.yahoo.com/gads?
t=ms&k=Macromedia+flex&w1=Web+site+design+development&w2=Computer+sof
tware+development&w3=Software+design+and+development&w4=Macromedia+fl
ex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6nPIrz7_EpZ
I36cYzBjw> Software
> > development best practice<http://groups.yahoo.com/gads?
t=ms&k=Software+development+best+practice&w1=Web+site+design+developm
ent&w2=Computer+software+development&w3=Software+design+and+developme
nt&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166
&.sig=f89quyyulIDsnABLD6IXIw>
> > ------------------------------
> > YAHOO! GROUPS LINKS
> >
> >
> > - Visit your
group "flexcoders<http://groups.yahoo.com/group/flexcoders>"
> > on the web.
> >
> > - To unsubscribe from this group, send an email to:
> > [EMAIL PROTECTED]<flexcoders-
[EMAIL PROTECTED]>
> >
> > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > Service <http://docs.yahoo.com/info/terms/>.
> >
> >
> > ------------------------------
> >
>
>
>
> --
> What goes up, does come down.
>
--
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
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

