You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by wkoch <wa...@boeing.com> on 2020/09/13 19:40:39 UTC

Is there an equivalent to Flex FocusOut on a Royale TextInput box?

In Flex there was a focusOut event on the textbox which we used heavily for
input validation functions.  I've tried using rollOut but that isn't working
since the user can still type into the text box. 



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: [EXTERNAL] Re: Is there an equivalent to Flex FocusOut on a Royale TextInput box?

Posted by Carlos Rovira <ca...@apache.org>.
Hi, great you saw it already :)

El lun., 14 sept. 2020 a las 14:07, Koch (US), Warren R (<
warren.r.koch@boeing.com>) escribió:

> Never mind.  My Fault.   I needed to use beads since the textinput was
> being defined in the container, not the AS.
>
>
>
> Thanks once more for all your help.
>
>
>
> *From:* Koch (US), Warren R
> *Sent:* Monday, September 14, 2020 6:31 AM
> *To:* users@royale.apache.org
> *Subject:* RE: [EXTERNAL] Re: Is there an equivalent to Flex FocusOut on
> a Royale TextInput box?
>
>
>
> I got the blur to fire but the event is not returning what I expect. I put
> the addEventListener in the creation complete handler and created a simple
> handler
>
>
>
> private function appComplete():void{
>
>
>
> COMPILE::JS{
>
> textbox_2.element.addEventListener("blur",
> BlurFired);
>
> textbox_3.element.addEventListener("blur", BlurFired);
>
>                 }
>
> }
>
>
>
> private function BlurFired(event:Event):void {
>
>                 label2.text = "fired blur " + event.target.text + " " +
> event.currentTarget.text ;
>
> }
>
>
>
> The label shows "fired blur undefined undefined".  I did not expect
> undefined.  Do I have the syntax wrong?
>
>
>
>
>
> *From:* Carlos Rovira [mailto:carlosrovira@apache.org
> <ca...@apache.org>]
> *Sent:* Sunday, September 13, 2020 6:10 PM
> *To:* users@royale.apache.org
> *Subject:* [EXTERNAL] Re: Is there an equivalent to Flex FocusOut on a
> Royale TextInput box?
>
>
>
> This message was sent from outside of Boeing. Please do not click links or
> open attachments unless you recognize the sender and know that the content
> is safe.
>
>
>
>
> Hi,
>
>
>
> you have a bead
>
>
>
> <j:TextInput localId="someId">
>
>     <j:beads>
>
>         <js:DispatchInputFinishedBead/>
>
>     </j:beads>
>
> </j:TextInput>
>
>
>
> You must listen for DispatchInputFinishedBead.INPUT_FINISHED
>
> so for example in the same container use:
>
>
>
> initComplete="initCompleteHandler()"
>
>
>
> and then:
>
>
>
> public function initCompleteHandler():void
>
> {
>
>    someId.addEventListener(DispatchInputFinishedBead.INPUT_FINISHED,
> somIdInputFinished);
>
> }
>
> private function someIdInputFinished(event:Event):void
>
> {
>
> // do something
>
> }
>
>
>
> other way. You can go low level (js) too:
>
>
>
> _textinput = new TextInput();
>
> COMPILE::JS {
>
> _textinput.element.addEventListener('blur', handleFocusOut);
>
> }
>
>
>
> protected function handleFocusOut(event:Event):void
>
> {
>
> // do something
>
> }
>
>
>
>
>
> El dom., 13 sept. 2020 a las 21:40, wkoch (<wa...@boeing.com>)
> escribió:
>
> In Flex there was a focusOut event on the textbox which we used heavily for
> input validation functions.  I've tried using rollOut but that isn't
> working
> since the user can still type into the text box.
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
>
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira

RE: [EXTERNAL] Re: Is there an equivalent to Flex FocusOut on a Royale TextInput box?

Posted by "Koch (US), Warren R" <wa...@boeing.com>.
Never mind.  My Fault.   I needed to use beads since the textinput was being defined in the container, not the AS.

Thanks once more for all your help.

From: Koch (US), Warren R
Sent: Monday, September 14, 2020 6:31 AM
To: users@royale.apache.org
Subject: RE: [EXTERNAL] Re: Is there an equivalent to Flex FocusOut on a Royale TextInput box?

I got the blur to fire but the event is not returning what I expect. I put the addEventListener in the creation complete handler and created a simple handler

private function appComplete():void{

COMPILE::JS{
textbox_2.element.addEventListener("blur", BlurFired);
textbox_3.element.addEventListener("blur", BlurFired);
                }
}

private function BlurFired(event:Event):void {
                label2.text = "fired blur " + event.target.text + " " + event.currentTarget.text ;
}

The label shows "fired blur undefined undefined".  I did not expect undefined.  Do I have the syntax wrong?


From: Carlos Rovira [mailto:carlosrovira@apache.org]
Sent: Sunday, September 13, 2020 6:10 PM
To: users@royale.apache.org<ma...@royale.apache.org>
Subject: [EXTERNAL] Re: Is there an equivalent to Flex FocusOut on a Royale TextInput box?


This message was sent from outside of Boeing. Please do not click links or open attachments unless you recognize the sender and know that the content is safe.




Hi,

you have a bead

<j:TextInput localId="someId">
    <j:beads>
        <js:DispatchInputFinishedBead/>
    </j:beads>
</j:TextInput>

You must listen for DispatchInputFinishedBead.INPUT_FINISHED
so for example in the same container use:

initComplete="initCompleteHandler()"

and then:

public function initCompleteHandler():void
{
   someId.addEventListener(DispatchInputFinishedBead.INPUT_FINISHED, somIdInputFinished);
}
private function someIdInputFinished(event:Event):void
{
// do something
}

other way. You can go low level (js) too:

_textinput = new TextInput();
COMPILE::JS {
_textinput.element.addEventListener('blur', handleFocusOut);
}

protected function handleFocusOut(event:Event):void
{
// do something
}


El dom., 13 sept. 2020 a las 21:40, wkoch (<wa...@boeing.com>>) escribió:
In Flex there was a focusOut event on the textbox which we used heavily for
input validation functions.  I've tried using rollOut but that isn't working
since the user can still type into the text box.



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/


--
Carlos Rovira
http://about.me/carlosrovira


RE: [EXTERNAL] Re: Is there an equivalent to Flex FocusOut on a Royale TextInput box?

Posted by "Koch (US), Warren R" <wa...@boeing.com>.
I got the blur to fire but the event is not returning what I expect. I put the addEventListener in the creation complete handler and created a simple handler

private function appComplete():void{

COMPILE::JS{
textbox_2.element.addEventListener("blur", BlurFired);
textbox_3.element.addEventListener("blur", BlurFired);
                }
}

private function BlurFired(event:Event):void {
                label2.text = "fired blur " + event.target.text + " " + event.currentTarget.text ;
}

The label shows "fired blur undefined undefined".  I did not expect undefined.  Do I have the syntax wrong?


From: Carlos Rovira [mailto:carlosrovira@apache.org]
Sent: Sunday, September 13, 2020 6:10 PM
To: users@royale.apache.org
Subject: [EXTERNAL] Re: Is there an equivalent to Flex FocusOut on a Royale TextInput box?


This message was sent from outside of Boeing. Please do not click links or open attachments unless you recognize the sender and know that the content is safe.




Hi,

you have a bead

<j:TextInput localId="someId">
    <j:beads>
        <js:DispatchInputFinishedBead/>
    </j:beads>
</j:TextInput>

You must listen for DispatchInputFinishedBead.INPUT_FINISHED
so for example in the same container use:

initComplete="initCompleteHandler()"

and then:

public function initCompleteHandler():void
{
   someId.addEventListener(DispatchInputFinishedBead.INPUT_FINISHED, somIdInputFinished);
}
private function someIdInputFinished(event:Event):void
{
// do something
}

other way. You can go low level (js) too:

_textinput = new TextInput();
COMPILE::JS {
_textinput.element.addEventListener('blur', handleFocusOut);
}

protected function handleFocusOut(event:Event):void
{
// do something
}


El dom., 13 sept. 2020 a las 21:40, wkoch (<wa...@boeing.com>>) escribió:
In Flex there was a focusOut event on the textbox which we used heavily for
input validation functions.  I've tried using rollOut but that isn't working
since the user can still type into the text box.



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/


--
Carlos Rovira
http://about.me/carlosrovira


Re: Is there an equivalent to Flex FocusOut on a Royale TextInput box?

Posted by Carlos Rovira <ca...@apache.org>.
Hi,

you have a bead

<j:TextInput localId="someId">
<j:beads>
<js:DispatchInputFinishedBead/>
</j:beads>
</j:TextInput>

You must listen for DispatchInputFinishedBead.INPUT_FINISHED
so for example in the same container use:

initComplete="initCompleteHandler()"

and then:

public function initCompleteHandler():void
{
someId.addEventListener(DispatchInputFinishedBead.INPUT_FINISHED,
somIdInputFinished);
}
private function someIdInputFinished(event:Event):void
{
// do something
}

other way. You can go low level (js) too:

_textinput = new TextInput();
COMPILE::JS {
_textinput.element.addEventListener('blur', handleFocusOut);
}

protected function handleFocusOut(event:Event):void
{
// do something
}


El dom., 13 sept. 2020 a las 21:40, wkoch (<wa...@boeing.com>)
escribió:

> In Flex there was a focusOut event on the textbox which we used heavily for
> input validation functions.  I've tried using rollOut but that isn't
> working
> since the user can still type into the text box.
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>


-- 
Carlos Rovira
http://about.me/carlosrovira