Hey thanks!...What I was really doing was using variable (undefined) arguments in the heirarchy. Here's the solution: function subclass() if (!arguments[7]) arguments[7] = FLAG_SPECIALFLAG; else arguments[7] |= FLAG_SPECIALFLAG;
this.superC = superConstructor; this.superC.apply(this,arguments); } ===== The "apply" function is one of those my book says is only in Netscape. However IE seems to have put it in (version 5.5). In this case 'apply' calls 'superC', and 'superC' will use 'this' as it's this, and it's arguments will be whatever array is passed as the second argument. So I call the superClass constructor with whatever the original arguments were, and can modify them. So that I can have default values if none are passed... Todd ----- Original Message ----- From: "Tuomas Huhtanen" <[EMAIL PROTECTED]> To: "'ToddNY'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, September 02, 2002 1:22 PM Subject: RE: [Dynapi-Help] subclassing stuff > function SubC(a,b,c,d,e){ > var newa = "FooA"; > this.SuperC = SuperC; > this.SuperC(newa,b,c); > } > SubC.prototype = new SuperC([possible_argument_list]); > > > Note that the argument list might not make sense when subclassing. It > should be taken into consideration already in the SuperC:s constructor, > like: > > function SuperC(a,b,c){ > if(arguments.length==0){ > return; > } > } > > -- > th > > > > How does subclassing work with arguments[] ??? > > > > if I have SuperC(a,b,c) > > and I have SubC(a,b,c,d,e) which is derived from SuperC() > > > > Do I need to pass the arguments from SubC() to SuperC() ? > > > > If I want to call SuperC() constructor from SubC() > > constructor and change an argument, to it, how do I do it? > > > > Any help/ideas, maybe I'm missing something being stupid... > > Thanks Todd. Perhaps I want to change SuperC()'s argument[] > > array and call it, is this the/a way??? > > > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by: OSDN - Tired of that same > > old cell phone? Get a new here for FREE! > > https://www.inphonic.com/r.asp?r=sourceforge1> &refcode1=vs3390 > > > > > > _______________________________________________ > > Dynapi-Help mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/d> ynapi-help > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > Dynapi-Help mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/dynapi-help ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ Dynapi-Help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dynapi-help