From: Pascal B. <pa...@dy...> - 2000-11-29 21:08:04
|
please note that if you really want to extend the dynlayer you should write it as an extension.. not a widget. So that would mean using DynLayer.prototype.extension as your code, not creating a new object. also it's not that much code to type when wanting to pass arguments to the DynLayer constructor: function myWidget(id,x,y,w,h) { this.DynLayer=DynLayer this.DynLayer(id,x,y,w,h) return this } that's all.. you simply pass the parameters to the DynLayer, no need to do every initialisation the DynLayer does (unless you want to change or check values first) Pascal Bestebroer pa...@dy... http://www.dynamic-core.net > -----Oorspronkelijk bericht----- > Van: dyn...@li... > [mailto:dyn...@li...]Namens Barre Bizon > Verzonden: woensdag 29 november 2000 19:43 > Aan: dyn...@li... > Onderwerp: Re: Re: [Dynapi-Dev] inheritance crusade / SuperClass stuff > > > Hmm.. but how about wanting widgets to fully extend > Dynlayer.. i.e. supporting exactly the same initialization > as Dynlayer has without writing the code over again. > > Do you not think that a construct() method would be a good > idea? As per my previous posts... > It wouldn't alter anything in essence.. nor complicate > anything. Just how the Dynlayer is initialized, allowing > widgets to (easily) do a general DynLayer initialization. > Apart from widget specific initialization... > > / Bart > > > I absolutely agree. Things are already complicated > enought and I don't want to add one single line of code > there. > > > > > > Dan Steinman wrote: > > > > > It is both mine and Pascal's opinion that no special > inheritance system is needed for DynAPI. Just make careful > attention, and structure using basic prototypes and you can > do everything (except doing multiple inheritance). Don't > overwrite variables, and you don't even necessarily need to > overwrite methods, and everything works perfectly. The > most simplistic solution is often the best, and I believe > that is the case here. > > > > > > Dan > > > > > > > _______________________________________________ > > Dynapi-Dev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > |