Harish,

Thanks for your input.  You're right.  Although I'd IDEALLY like to 
bump the user to the next field, the MAIN issue is that I get a 
validation trigger.

I sure wish that TextInput had a built in way to treat Enter EXACTLY 
as it treats a tab, however.  I know that someone else has recently 
posted a thread about how to do the equivilent of "DoEvent()", and I 
think the converting an Enter to a Tab would be EXACTLY what I'm 
looking for.

Thanks again,

Steve



--- In flexcoders@yahoogroups.com, "Harish Sivaramakrishnan" 
<[EMAIL PROTECTED]> wrote:
>
> is bumping the user out a *requirement* or are you doing it to 
force the
> validator to trigger? if latter, you could call validatePhoneNumber
() when
> enter event is fired?
> 
> 
> On 5/31/07, Alex Harui <[EMAIL PROTECTED]> wrote:
> >
> >    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:* flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] *On
> > Behalf Of *stevekpeak8
> > *Sent:* Wednesday, May 30, 2007 5:36 PM
> > *To:* flexcoders@yahoogroups.com
> > *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 flexcoders@yahoogroups.com <flexcoders%
40yahoogroups.com>, "Alex
> > Harui" <aharui@> wrote:
> > >
> > > The code looks like it should dispatch ENTER anyway. Did you not
> > get
> > > it?
> > >
> > >
> > >
> > > ________________________________
> > >
> > > From: flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>
> > [mailto:flexcoders@yahoogroups.com <flexcoders%
40yahoogroups.com>] On
> > > Behalf Of stevekpeak8
> > > Sent: Wednesday, May 30, 2007 8:50 AM
> > > To: flexcoders@yahoogroups.com <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 flexcoders@yahoogroups.com <flexcoders%
40yahoogroups.com><mailto:
> > flexcoders% <flexcoders%25>
> > 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: flexcoders@yahoogroups.com <flexcoders%
40yahoogroups.com><mailto:
> > flexcoders% <flexcoders%25>
> > 40yahoogroups.com>
> > >
> > > [mailto:flexcoders@yahoogroups.com <flexcoders%
40yahoogroups.com><mailto:
> > flexcoders% <flexcoders%25>
> > 40yahoogroups.com>
> > > ] On
> > > > Behalf Of Steve Kellogg
> > > > Sent: Tuesday, May 29, 2007 5:12 PM
> > > > To: flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com> 
<mailto:
> > flexcoders% <flexcoders%25>
> > 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
> > > >
> > >
> >
> >  
> >
>


Reply via email to