Yes, that is the issue, and it only comes up in swf9 because the runtime is so picky about type checking. <br><br>We do need to make some kind of workaround or better error message for this. Maybe a catch in the new LzDelegate, so that we can give a clue as to what expression is causing the error, and/or keep going with a debug warning. <br>
<br><br><div class="gmail_quote">On Sun, Jun 21, 2009 at 7:19 PM, Raju Bitter <span dir="ltr">&lt;<a href="mailto:rajubitter@me.com">rajubitter@me.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Interesting, Henry. That means constraints can only be used with most LFC and all LZX objects, not with anything on an AS3 level below the LFC? What was the reason to make some objects not extend LzEventable?<div><div></div>
<div class="h5"><br>
<br>
On Jun 22, 2009, at 12:29 AM, Henry Minsky wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
To debug this, you can actually look at the intermediate actionscript  code which the<br>
compiler emitted, it will still be in those tmp files that it is printing out.<br>
<br>
The code in the file in LzNode applyConstraintMethod corresponds to this line of code<br>
<br>
      for (var i = 0, l = dependencies.length; i &lt; l; i += 2) {<br>
        dp = dependencies[i];<br>
        if (dp) {<br>
===&gt;      var d = new LzDelegate(this, constraintMethodName, dp, &quot;on&quot; + dependencies[i + 1]);<br>
          this.__LZdelegates.push(d);<br>
        }<br>
      }<br>
<br>
And I bet the issue is that you have a constraint expression in the<br>
app, which is constraining a value of some object which is not an<br>
LzEventable.<br>
<br>
The signature of LzDelegate is<br>
    public function LzDelegate (context:LzEventable, methodName:String, eventSender:LzEventable = null, eventName:String = null) {<br>
<br>
So both the target and the event source need to be LzEventable.<br>
<br>
If you write a constraint that constrains to a value on an object that&#39;s does not obey the<br>
LzEventable protocol, then the system constructs a delegate that tries to register to<br>
get an event when the value changes, but it can&#39;t construct that delegate.<br>
<br>
For example if you said<br>
<br>
&lt;myfoo bar=&quot;${some_non_node.foo + 1} ...&gt;<br>
<br>
And &quot;some_non_node&quot; is an object that isn&#39;t an LzNode  ( or to be more exact,  is not a subclass of LzEventable)<br>
then when that constraint gets installed, it will get the error you&#39;re seeing.<br>
<br>
So check all you constraints and see if you&#39;re constraining to<br>
something that isn&#39;t an LzEventable.<br>
<br>
There are some things in the LFC which are NOT LzEventable, and we need to make the<br>
compiler warn you somehow...<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br><br><br>