August 21, 2009

Flex setter not executing when using binding

Filed under: as3, debugging, flex, tip, workaround — michaelangela @ 5:30 am

Good to know. And it does make sense as described in the comments. This is for my future reference and for others who may experience it.

In a nutshell, if you have a getter/setter pair and make them [Bindable], the setter will not execute again if the new incoming value is the same as the current value. That speeds up performance but if you always need to check that value, it might be a bit confusing why it’s not executing.

nwebb » One Reason Why Your Flex Getter May Not Execute

As soon as you make the getter/setter bindable, Flex stops running the setter whenever the value you’re sending in already matches the value that the corresponding getter will return.

The solution (or at least one solution) is not to rely upon the default propertyChange event which is dispatched for bindable values, and instead create/dispatch a custom event

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: