The short answer is if you have the time to write the code to use 
[Bindable(”fooChange”)] the result will be a bit more efficient.  Using 
[Bindable] is easier to write, but has a cost.  The cost is roughly what 
proportion of public properties need to actually dispatch change events.  
Royale SWCs in Royale releases should never use [Bindable].  We should take the 
time to optimize and use [Bindable(”fooChange”)].  What the app developer does 
is their own decision.

From: Maria Jose Esteve <mjest...@iest.com>
Reply-To: "users@royale.apache.org" <users@royale.apache.org>
Date: Thursday, April 14, 2022 at 10:04 AM
To: "users@royale.apache.org" <users@royale.apache.org>
Subject: RE: Binding - dispatch event change

I will look into it, thanks Yishay

Hiedra

De: Yishay Weiss <yishayj...@hotmail.com>
Enviado el: martes, 12 de abril de 2022 12:28
Para: users@royale.apache.org
Asunto: RE: Binding - dispatch event change

You might find answers here [1]

[1] Using Bindable Metadata Events | Tournas Dimitrios 
(wordpress.com)<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftournasdimitrios1.wordpress.com%2F2010%2F08%2F01%2Fusing-bindable-metadata-events%2F&data=04%7C01%7Caharui%40adobe.com%7C65cec8778b514ca86b9508da1e38a625%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637855526509966549%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Q7hQc4uUDhJMckqddUsA%2FU%2B6i2sa4a8RNstBERCbL00%3D&reserved=0>

From: Maria Jose Esteve<mailto:mjest...@iest.com>
Sent: Tuesday, April 12, 2022 1:14 PM
To: users@royale.apache.org<mailto:users@royale.apache.org>
Subject: Binding - dispatch event change

Hello, I want to ask you a general question about the binding of as3 properties.
In the SDK we can observe different implementations:

[Bindable]
…
public function set foo(value:Boolean):void{
                _foo = value;
}
//-----------------------------
[Bindable(”fooChange”)]
…
public function set foo(value:Boolean):void{
                _foo = value;
}
//-----------------------------
[Bindable]
…
public function set foo(value:Boolean):void{
                _foo = value;
                dispatchEvent(new Event(“fooChange”));
}
//-----------------------------
[Bindable(”fooChange”)]
…
public function set foo(value:Boolean):void{
                _foo = value;
                dispatchEvent(new Event(“fooChange”));
}
//-----------------------------
public function set foo(value:Boolean):void{
                _foo = value;
                dispatchEvent(new Event(“fooChange”));
}

What is the difference between these options? In what cases would you implement 
one or the other?

Thx.
Hiedra


Reply via email to