[Laszlo-dev] For Review: Change 20080328-hqm-S Summary: check if override needed on method declarations in classes
Donald Anderson
dda at ddanderson.com
Fri Mar 28 11:01:46 PDT 2008
On Mar 28, 2008, at 1:35 PM, Henry Minsky wrote:
> I think here is an example, the problem is a method defined on a
> view, not a class,
>
> <view name="menucap" y="${parent._currentattachy == 'top'? -
> height + 1:parent.height }"...
> ...
> ...
> <method name="setY" args="y"> <![CDATA[
> super.setY(y);
> if ( y < 0 ) {
> this.setResourceNumber(1);
> } else {
> this.setResourceNumber(2);
> }
> ]]>
>
> generates a function expression in a hash table, with the "override"
> keyword just hanging in there in the attrs list, causing a parser
> error
>
>
>
> }, setY: override function setY( y) {
>
>
> So we need to suppress this on methods that are declared on views.
You're talking about what the tag compiler emits, right?
> Although in this case we're screwed because
> it calls super.setY, so we really need to make this a singleton
> class...
What's the rule? Cannot call super methods when declaring an event
method, or what?
--
Don Anderson
Java/C/C++, Berkeley DB, systems consultant
voice: 617-547-7881
email: dda at ddanderson.com
www: http://www.ddanderson.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20080328/17b80b0a/attachment.html
More information about the Laszlo-dev
mailing list