But the "args" parameter to determinePlacement is the parameter
passed into LzNode.construct. It's just passed through to
determinePlacement in case someone wants to grovel through the init
args when deciding placement.
On Nov 1, 2006, at 8:30 AM, P T Withington wrote:
What you really want to be able to do is say:
super.determinePlacement.apply(this, arguments);
But the compiler does not (quite) support that. I spent a few
minutes trying to see how hard that would be to support, and it was
not just a quick fix (because of the way super is wedged in).
In most o-o languages I have used, there is a shorthand, like:
super();
which means 'call the method I am overriding with the arguments
that I got'. I suppose we can't get away with that, because C++
has co-opted that to mean call my superclass's constructor. But it
sure would be convenient, since I think it is much more common to
want to call the method you override and pass it all the same
arguments that to want to call your superclass constructor. [In
our world you call super.initialize anyways, so there is no
ambiguity.]
On 2006-11-01, at 09:59 EST, 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