Exactly right. We need to integrate the automatic schema. Then we
can address this bug. See:
http://jira.openlaszlo.org/jira/browse/LPP-6080
We have to 'gensym' any missing args to make sure they do not conflict
with the method body.
On 2008-09-10, at 18:04EDT, Henry Minsky wrote:
As I understand it we don't have a lot of freedom in as3 as to how
the
method arg signature looks.
If there are required args in the superclass method, we can't make
any of
the subclass method's args optional.
If the superclass has optional args in its arglist, we have to
declare them
as optional in the subclass method. .They can have different default
values,
but that is the only difference alllowed.
So I think the two features we could provide would be
1) to massage args to be optional with default values, if the base
class
has
<method name="foo" args="a,b=259">
and the user declares
<method name="foo" args="a,b">
Then the compiler will declare it as "a,b=259"
2) to add extra optional args as needed, so if the base class is
<method name="foo" args="a,b=259">
and the user declares
<method name="foo" args="a">
Then the compiler will declare it as "a,b=259"
This makes me uneasy, as there will be this arg lurking around that
the user
has no
idea exists in their method.
We can get our hands on the info in the tag compiler to do this, but
we
don't currently have the information
as to the arg signatures from the javascript LFC libraries.
Don has his automatic schema generator almost working, so that would
make
it
a lot more feasible to generate this info for the base LFC schema
file.
On Wed, Sep 10, 2008 at 5:01 PM, Max Carlson <[EMAIL PROTECTED]>
wrote:
Hi,
I wanted to get a discussion going about resolving the issue with
the AS3
requirement that superclass method argument signatures match the
superclass
implementation. This can lead to code changes that aren't backward
compatible with I've written 4.1.x. I wrote about the issue here:
http://wiki.openlaszlo.org/Runtime_Differences#Argument_signatures_on_overridden_methods_must_match_the_superclass_definition
and filed http://jira.openlaszlo.org/jira/browse/LPP-6950 to make the
error message more helpful. What do you think is the best way to
deal with
this issue?
--
Regards,
Max Carlson
OpenLaszlo.org
--
Henry Minsky
Software Architect
[EMAIL PROTECTED]