The "right" way is to try to avoid properties which aren't independent.
commitProperties() wasn't intended to be used to set one property based
on another property

 

- Gordon

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Troy Gilbert
Sent: Friday, April 04, 2008 2:44 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Changing a property inside of
commitProperties?

 

> Why not just have the setter for myCustomData simply set 'label' and
other
> properties rather than doing this in commitProperties()?

Yeah, I could definitely do that... I was more interested in doing
things the "right" way, at least in line with convention, and my
impression of the convention (from the docs on writing AS components)
was that overriding commit properties was the thing to do.

Of course, none of the examples address a derived component updating
an internal property, so maybe this scenario warrants a different
convention... but it didn't seem too far off the beaten path.

Calling super.commitProperties() at the end of my commitProperties()
does the trick. It still feels like I'm working around a potential
problem in the framework, though, or at least my weak understanding of
that part of the framework.

Troy.

 

Reply via email to