You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by Serkan Taş <se...@likyateknoloji.com> on 2019/12/06 19:32:09 UTC

Event handling

Hi,

Where can I get information about event handling mechanism in royale ?

e.g : dispatchEvent(new Event("textChanged")); needs to be handled in 
where ?

Thanks,
Serkan

Re: Event handling

Posted by Serkan Taş <se...@likyateknoloji.com>.
I am happy to have a response, thanks Alex.

6.12.2019 22:53 tarihinde Alex Harui yazdı:
>
> I don’t know these components very well to answer without taking time 
> to research.  Changing a value as part an event does not sound like a 
> kind of case we would have in our examples, so it doesn’t surprise me 
> that the emulation doesn’t currently support it.  So you or some other 
> volunteer may need to implement emulation for it.  That’s how the 
> emulation components are being developed.  Someone needs a feature 
> from Flex and that person or someone else implements an emulation for 
> that feature.
>
Sure, I am aware. I have done it before.

> I thought that the examples in TourDeFlex were working at one point in 
> time but would not be surprised if they are broken.  But getting those 
> to work again if they don’t might help educate you on how TLF is 
> supposed to work in simple cases.
>
I am not sure if I can make them work with not any direction. I mean 
while developing my application I completely focused on the back-end and 
so strong at front-end. Used the available components and not get in to 
internals.
I am trying to understand but for the time passed I can say that it is 
really not efficient in my side. I have not so much time to spend on 
royale as most of the others and you, I need to make valuable 
improvements in very limited time.

I mean rather spending time on trying something may be it is better to 
learn in some other way. May be there should be some documentation about 
how TLF works in Flex and should work on Royale ?

Thanks,
Serkan
>
> -Alex
>
> *From: *Serkan Taş <se...@likyateknoloji.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, December 6, 2019 at 11:49 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Event handling
>
> I am checking the samples RichEditableText and TextArea in royale but 
> non of them looks like working in my case. If the text value is set 
> through the "textChanged" event, than it is not handled any where, at 
> least in my case.
>
> 6.12.2019 22:39 tarihinde Alex Harui yazdı:
>
>     The event mechanism is essentially the W3C DOM Events spec and
>     same as Flex.  The only known difference that comes to mind right
>     now is that stopImmediatePropagation in Royale also currently
>     stops execution of the handler, but that might change some day (soon).
>
>     For your sample source, since bubbling is not specified, the
>     listeners need to be attached to the target or, if the dispatcher
>     is part of the DOM can be captured by parents.
>
>     -Alex
>
>     *From: *Serkan Taş <se...@likyateknoloji.com>
>     <ma...@likyateknoloji.com>
>     *Reply-To: *"users@royale.apache.org"
>     <ma...@royale.apache.org> <us...@royale.apache.org>
>     <ma...@royale.apache.org>
>     *Date: *Friday, December 6, 2019 at 11:32 AM
>     *To: *"users@royale.apache.org" <ma...@royale.apache.org>
>     <us...@royale.apache.org> <ma...@royale.apache.org>
>     *Subject: *Event handling
>
>     Hi,
>
>     Where can I get information about event handling mechanism in royale ?
>
>     e.g : dispatchEvent(new Event("textChanged")); needs to be handled
>     in where ?
>
>     Thanks,
>     Serkan
>
>
>
>


Re: Event handling

Posted by Alex Harui <ah...@adobe.com>.
I don’t know these components very well to answer without taking time to research.  Changing a value as part an event does not sound like a kind of case we would have in our examples, so it doesn’t surprise me that the emulation doesn’t currently support it.  So you or some other volunteer may need to implement emulation for it.  That’s how the emulation components are being developed.  Someone needs a feature from Flex and that person or someone else implements an emulation for that feature.

I thought that the examples in TourDeFlex were working at one point in time but would not be surprised if they are broken.  But getting those to work again if they don’t might help educate you on how TLF is supposed to work in simple cases.

-Alex

From: Serkan Taş <se...@likyateknoloji.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Friday, December 6, 2019 at 11:49 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Event handling

I am checking the samples RichEditableText and TextArea in royale but non of them looks like working in my case. If the text value is set through the "textChanged" event, than it is not handled any where, at least in my case.
6.12.2019 22:39 tarihinde Alex Harui yazdı:
The event mechanism is essentially the W3C DOM Events spec and same as Flex.  The only known difference that comes to mind right now is that stopImmediatePropagation in Royale also currently stops execution of the handler, but that might change some day (soon).

For your sample source, since bubbling is not specified, the listeners need to be attached to the target or, if the dispatcher is part of the DOM can be captured by parents.

-Alex

From: Serkan Taş <se...@likyateknoloji.com>
Reply-To: "users@royale.apache.org"<ma...@royale.apache.org> <us...@royale.apache.org>
Date: Friday, December 6, 2019 at 11:32 AM
To: "users@royale.apache.org"<ma...@royale.apache.org> <us...@royale.apache.org>
Subject: Event handling

Hi,

Where can I get information about event handling mechanism in royale ?

e.g : dispatchEvent(new Event("textChanged")); needs to be handled in where ?

Thanks,
Serkan





Re: Event handling

Posted by Serkan Taş <se...@likyateknoloji.com>.
e.g

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                xmlns:s="library://ns.apache.org/royale/spark"
                xmlns:mx="library://ns.apache.org/royale/mx"
                paddingBottom="0" paddingTop="0" paddingLeft="0" 
paddingRight="0"
                height="100%" width="100%"
                >

     <fx:Script>
     </fx:Script>

     <s:Panel title="TextArea Sample" width="100%" height="100%">

         <s:layout>
             <s:HorizontalLayout paddingLeft="10" paddingRight="10" 
paddingTop="10" paddingBottom="10"/>
         </s:layout>


         <s:VGroup>
             <s:Label text="Text:"/>
             <s:TextArea id="txt" width="300" height="70" 
color="0x323232" horizontalCenter="0" verticalCenter="0" restrict="a-z 1-9"
                         text="Text Area"/>
         </s:VGroup>

         <s:RichEditableText id="richEdTxt" widthInChars="20" 
heightInLines="10"
                             backgroundColor="0xCCCCCC" text="Hello world!">
         </s:RichEditableText>

     </s:Panel>

</s:Application>

6.12.2019 22:48 tarihinde Serkan Taş yazdı:
> I am checking the samples RichEditableText and TextArea in royale but 
> non of them looks like working in my case. If the text value is set 
> through the "textChanged" event, than it is not handled any where, at 
> least in my case.
>
> 6.12.2019 22:39 tarihinde Alex Harui yazdı:
>>
>> The event mechanism is essentially the W3C DOM Events spec and same 
>> as Flex.  The only known difference that comes to mind right now is 
>> that stopImmediatePropagation in Royale also currently stops 
>> execution of the handler, but that might change some day (soon).
>>
>> For your sample source, since bubbling is not specified, the 
>> listeners need to be attached to the target or, if the dispatcher is 
>> part of the DOM can be captured by parents.
>>
>> -Alex
>>
>> *From: *Serkan Taş <se...@likyateknoloji.com>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Friday, December 6, 2019 at 11:32 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Event handling
>>
>> Hi,
>>
>> Where can I get information about event handling mechanism in royale ?
>>
>> e.g : dispatchEvent(new Event("textChanged")); needs to be handled in 
>> where ?
>>
>> Thanks,
>> Serkan
>>
>


Re: Event handling

Posted by Serkan Taş <se...@likyateknoloji.com>.
I am checking the samples RichEditableText and TextArea in royale but 
non of them looks like working in my case. If the text value is set 
through the "textChanged" event, than it is not handled any where, at 
least in my case.

6.12.2019 22:39 tarihinde Alex Harui yazdı:
>
> The event mechanism is essentially the W3C DOM Events spec and same as 
> Flex.  The only known difference that comes to mind right now is that 
> stopImmediatePropagation in Royale also currently stops execution of 
> the handler, but that might change some day (soon).
>
> For your sample source, since bubbling is not specified, the listeners 
> need to be attached to the target or, if the dispatcher is part of the 
> DOM can be captured by parents.
>
> -Alex
>
> *From: *Serkan Taş <se...@likyateknoloji.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, December 6, 2019 at 11:32 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Event handling
>
> Hi,
>
> Where can I get information about event handling mechanism in royale ?
>
> e.g : dispatchEvent(new Event("textChanged")); needs to be handled in 
> where ?
>
> Thanks,
> Serkan
>


Re: Event handling

Posted by Alex Harui <ah...@adobe.com>.
The event mechanism is essentially the W3C DOM Events spec and same as Flex.  The only known difference that comes to mind right now is that stopImmediatePropagation in Royale also currently stops execution of the handler, but that might change some day (soon).

For your sample source, since bubbling is not specified, the listeners need to be attached to the target or, if the dispatcher is part of the DOM can be captured by parents.

-Alex

From: Serkan Taş <se...@likyateknoloji.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Friday, December 6, 2019 at 11:32 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Event handling

Hi,

Where can I get information about event handling mechanism in royale ?

e.g : dispatchEvent(new Event("textChanged")); needs to be handled in where ?

Thanks,
Serkan