[Laszlo-dev] are there any tips on how to debug swf9 player excpetions?
Raju Bitter
rajubitter at me.com
Sun Jun 21 16:19:04 PDT 2009
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?
On Jun 22, 2009, at 12:29 AM, Henry Minsky wrote:
>
> To debug this, you can actually look at the intermediate
> actionscript code which the
> compiler emitted, it will still be in those tmp files that it is
> printing out.
>
> The code in the file in LzNode applyConstraintMethod corresponds to
> this line of code
>
> for (var i = 0, l = dependencies.length; i < l; i += 2) {
> dp = dependencies[i];
> if (dp) {
> ===> var d = new LzDelegate(this, constraintMethodName, dp,
> "on" + dependencies[i + 1]);
> this.__LZdelegates.push(d);
> }
> }
>
> And I bet the issue is that you have a constraint expression in the
> app, which is constraining a value of some object which is not an
> LzEventable.
>
> The signature of LzDelegate is
> public function LzDelegate (context:LzEventable,
> methodName:String, eventSender:LzEventable = null, eventName:String
> = null) {
>
> So both the target and the event source need to be LzEventable.
>
> If you write a constraint that constrains to a value on an object
> that's does not obey the
> LzEventable protocol, then the system constructs a delegate that
> tries to register to
> get an event when the value changes, but it can't construct that
> delegate.
>
> For example if you said
>
> <myfoo bar="${some_non_node.foo + 1} ...>
>
> And "some_non_node" is an object that isn't an LzNode ( or to be
> more exact, is not a subclass of LzEventable)
> then when that constraint gets installed, it will get the error
> you're seeing.
>
> So check all you constraints and see if you're constraining to
> something that isn't an LzEventable.
>
> There are some things in the LFC which are NOT LzEventable, and we
> need to make the
> compiler warn you somehow...
>
More information about the Laszlo-dev
mailing list