I think it should be
public function ExitValidatedField():void{
focusManager.getNextFocusManagerComponent().setFocus();
}
Hitting the breakpoint shifts focus to the debugger and causes the
player and textinput to lose focus.
There might be some type-casting needed, but that should get you closer
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of stevekpeak8
Sent: Wednesday, May 30, 2007 5:36 PM
To: [email protected]
Subject: [flexcoders] Re: TextInput vs. ENTER key.
Alex,
Thanks again for your response.
It's VERY ODD.
I've created a public function thusly..
public function ExitValidatedField():void{
focusManager.getNextFocusManagerComponent();
}
And put the following attributes into my TextInput Fields:
enter="ExitValidatedField();"
If I put a BREAKPOINT on the line of code where focusManager is being
called, then the breakpoint DOES fire, and the focus DOES leave the
field. BUT... If I REMOVE the breakpoint, then the focus does NOT
leave the field.
Do I need to manually add some REFRESH to this procedure?
I'm SOOOO confused.
Best
Steve
--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> The code looks like it should dispatch ENTER anyway. Did you not
get
> it?
>
>
>
> ________________________________
>
> From: [email protected] <mailto:flexcoders%40yahoogroups.com>
[mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of stevekpeak8
> Sent: Wednesday, May 30, 2007 8:50 AM
> To: [email protected] <mailto:flexcoders%40yahoogroups.com>
> Subject: [flexcoders] Re: TextInput vs. ENTER key.
>
>
>
> Alex,
>
> Thanks for your response. listening for ENTER is actually the first
> thing I tried, but it doesn't work as I'd expect. These controls
are
> NOT inside a FORM (explicitly, at least; it's inside a PANEL). Is
> that part of the problem?
>
> TIA
>
> Steve
>
> --- In [email protected]
<mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%
40yahoogroups.com>
> , "Alex Harui" <aharui@> wrote:
> >
> > Listen for the "enter" event and set focus somewhere else. You
can
> use
> > focusManager.getNextFocusManagerComponent if you're not sure
where
> to
> > set focus.
> >
> >
> >
> > ________________________________
> >
> > From: [email protected]
<mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%
40yahoogroups.com>
>
> [mailto:[email protected]
<mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%
40yahoogroups.com>
> ] On
> > Behalf Of Steve Kellogg
> > Sent: Tuesday, May 29, 2007 5:12 PM
> > To: [email protected] <mailto:flexcoders%40yahoogroups.com>
<mailto:flexcoders%
40yahoogroups.com>
> > Subject: [flexcoders] TextInput vs. ENTER key.
> >
> >
> >
> > Hello,
> >
> >
> >
> > I have a number of TextInput controls that I'm using with
Validators
> > (phoneNumber, email, etc).
> >
> >
> >
> > It all works correctly, except that I want an ENTER (or RETURN)
to
> bump
> > the user out of the field (therefore triggering the validator).
> >
> >
> >
> > Any ideas how to do this? Will RESTRICT allow me to tell
> TextInput to
> > treat ENTER and RETURN the same as TAB?
> >
> >
> >
> > TIA
> >
> >
> >
> > Steve
> >
>