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
--
Jason Stafford
Principal Developer
Inspiration Software, Inc.
The leader in visual thinking & learning
InspireData(tm), the newest innovative thinking and learning tool from
Inspiration Software(r), extends the proven power of visual learning to
data analysis. Learn more at www.inspiration.com.
503-297-3004 Extension 119
503-297-4676 (Fax)
9400 SW Beaverton-Hillsdale Highway
Suite 300
Beaverton, OR 97005-3300