As with any little bit of OL that you start poking your nose into, it's always 
more complex than you imagine.

I started tackling http://jira.openlaszlo.org/jira/browse/LPP-7344 thinking 
that all I would need to do is take away the type declarations on LzDelegate 
and enable the runtime warnings that are used in lieu of type declarations for 
the non-typed runtimes.

Well, that was a start.  That covers the case of someone trying to constrain to 
a property of an object that is not an LzEventable.  But the case in 
http://jira.openlaszlo.org/jira/browse/LPP-7958 which is related, is actually 
because someone is trying to constrain to a method of a non-dynamic object.  In 
as3, this results in a type error, because the code that is looking for the 
dependency function will fail on a sealed object, rather than just returning 
null.

To fix this issue, I propose moving the function dependency calculation into a 
runtime support routine that will catch the type error.

The question is:  when you constrain to function that does not have a 
dependencies method, should you get a warning (because you might wonder why 
your constraint does not update) or should it silently succeed (because that is 
what happens in swf8 and DHTML right now)?

Also, while trying to make the error message that you get more useful (by 
telling you which constraint it is that is not getting its dependencies right), 
I notice that we get a pile of "failed" dependencies already, that are just 
silently ignored.  These seem to come from dependencies that perhaps are 
evaluated too soon and hence the context of the event they want to listen to 
does not yet exist.  It seems we might want to get a warning on those too?

Reply via email to