[Laszlo-dev] LzNode.determinePlacement
Adam Wolff
adam at laszlosystems.com
Wed Nov 1 10:54:03 PST 2006
I think that the right syntax here would be:
super.appply( super.foo , arguments );
Of course all of this would have to be special-cased because there is no
real "super" object as such. That, in turn, might lead to confusion, since
one might expect a reference to super.bar to refer to my superclass's
value for bar, whatever mine may be.
A
On Nov 1, Jason Stafford wrote:
> It would be nice if there was some way to just pass on all your arguments
> without having to know how many super expects. That way a function could pass
> through an undocumented extra parameter, or if the base function had extra
> parameters added later, it wouldn't require updating of all the subclasses.
>
> I'm thinking of syntax like:
> super.foo(arguments);
>
> You can sort of do this now as:
> super.foo(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]);
>
> But this assumes that there are never more than 7 parameters, plus it ends up
> calling super.foo with 7 parameters, which might confuse super.foo if it is
> looking at arguments.length
>
> I know you've already got too much to do to add this, but just planting a seed
> for you to think about.
>
> -Jason
>
> Jim Grandy wrote:
> > This is one of those situations where nobody currently uses the parameter,
> > but it might come in handy some day. Given that determinePlacement is
> > optimized in the case where there are no overrides, there's not much
> > overhead to passing it around. I agree as well.
> >
> > On Nov 1, 2006, at 6:36 AM, P T Withington wrote:
> >
> > > I agree. When calling your super method, you should pass all the
> > > arguments that you are called with.
> > >
> > > On 2006-10-31, at 21:36 EST, Philip Romanik wrote:
> > >
> > > > Hi Tucker,
> > > >
> > > > determinePlacement() has 3 arguments but most components only mention
> > > > the first two (basetabs.lzx for example) when overridden. This is a bit
> > > > of a nit, but I think all references to super.determinePlacement()
> > > > should pass all 3 parameters. Or, is the third parameter cruft?
> > > >
> > > > Thanks!
> > > >
> > > > Phil
> > > >
> > >
> >
>
>
More information about the Laszlo-dev
mailing list