Tracy:

To me it seems your trying too hard to make the problem a declarative
problem.  The more elegant solution would just having the TestParam
instantiated through actionscript in a <mx:Script>  Also make that variable
[Bindable] and you then have your solution, and then you can have a parent
property inside it.  The way you are currently doing it will cause it to
have a circular reference.  Be sure to also test for null in the leParameter
setter.

There are probably other ways as well, but they may not be as elegant as you
desire.

I know it seems elegant to just declare everything in mxml tags, but the

On 11/20/06, Tracy Spratt <[EMAIL PROTECTED]> wrote:

   I have two "faceless" custom components, "Parameter" and "LEValue",
neither extend a stock class.  Parameter is like a value object and LEValue
is a smart attribute of Parameter. Get/Set functions in Parameter put its
"value" attribute in an LEValue object property.  The components are
instantiated in mxml

The problem is that on initialize of the application, the Parameter's
value attribute is being set (Setter is trying to access LEValue.value)
before the LEValue object is initialized, and I get a null reference
error.  Here is the mxml that instantiates the two components:





 <ltle:LEValue id="Testparm_value" leParameter="{Testparm}" />

  <ltle:Parameter id="Testparm" leValue="{Testparm_value}" value="AAA" />

As you see, I want both components to be aware of each other.

If I test for leValue != null in the Parameter set value function, then
everything works ok after initialize is complete.  But the initial value "
AAA" is not set into the LEValue property.

I have bounced around trying different things, and am sure I can throw
enough code at the problem to make it work, but I'd like to do it simply
and efficiently!

Any suggestions will be welcome. Including directed RTFMs!

Tracy Spratt




--
Dominick Accattato, CTO
New View Networks
www.newviewnetworks.com

Reply via email to