[Dynapi-Dev] inheritance, priveate vars, etc

2001-02-05 Thread ruairi . mccomb
Hello to everyone out there, here's a link to a very interesting article that actually deals with some of the problems you've been having (inheritance, private variables, etc.) http://www.pbwizard.com/Articles/class_inheritance.htm Happy Reading Ruairi Mc Comb __

RE: [Dynapi-Dev] Inheritance

2000-12-12 Thread Pascal Bestebroer
> -Oorspronkelijk bericht- > Van: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]Namens Brandon Myers > Verzonden: dinsdag 12 december 2000 17:28 > Aan: [EMAIL PROTECTED] > Onderwerp: RE: [Dynapi-Dev] Inheritance > Ya can't set properties if you don't first

RE: [Dynapi-Dev] Inheritance

2000-12-12 Thread Joachim Lundgren
At 2000-12-12 14:01 , you wrote: >> For example the ListItem class: >> >> function ListItem(text,value) >> { >> this.superClass = Label; >> this.superClass(text); >> this.value = value; >> ... >> } >> ListItem.prototy

RE: [Dynapi-Dev] Inheritance

2000-12-12 Thread Brandon Myers
> -Original Message- > From: Pascal Bestebroer > Sent: Tuesday, December 12, 2000 3:01 AM > To: [EMAIL PROTECTED] > Subject: RE: [Dynapi-Dev] Inheritance > > > The whole prototype code is THE way that Javascript does inheriting (read > the Netscape references) T

RE: [Dynapi-Dev] Inheritance

2000-12-12 Thread Simon Dicon Montford
> For example the ListItem class: > > function ListItem(text,value) > { > this.superClass = Label; > this.superClass(text); > this.value = value; > ... > } > ListItem.prototype = new Label(); > > Perfect, except for

RE: [Dynapi-Dev] Inheritance

2000-12-11 Thread Pascal Bestebroer
ndrew LePera Verzonden: dinsdag 12 december 2000 8:49 Aan: [EMAIL PROTECTED] Onderwerp: Re: [Dynapi-Dev] Inheritance On the face of it I don't think it's entirely necessary unless your goal is to create a large hierarchy of objects, in which case you could just use the SuperClass object as y

Re: [Dynapi-Dev] Inheritance

2000-12-11 Thread Scott Andrew LePera
--- scott andrew lepera [EMAIL PROTECTED] web stuff: www.scottandrew.com music stuff: www.walkingbirds.com -Original Message- From: Brandon Myers <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date: Monday, December 11, 2000 6:14 PM Subject: RE: [Dynapi-Dev] Inhe

Re: [Dynapi-Dev] Inheritance

2000-12-11 Thread Joachim Lundgren
At 2000-12-12 00:03 , you wrote: >I think it's always better not to say MyObject.prototype=new DynObject (That makes me understand SuperClass better...) >Reasoning: We shouldn't want instance variables to be prototype variables. >All variables initialized within the DynObject constructor will be

RE: [Dynapi-Dev] Inheritance

2000-12-11 Thread Brandon Myers
ECTED]]On Behalf Of Simon Dicon Montford Sent: Monday, December 11, 2000 6:12 PM To: [EMAIL PROTECTED] Subject: RE: [Dynapi-Dev] Inheritance > I was wondering the point of this line when inheriting objects: > > MyObject.prototype = new DynObject(); It's so that any changes to Dyn

RE: [Dynapi-Dev] Inheritance

2000-12-11 Thread Simon Dicon Montford
> I was wondering the point of this line when inheriting objects: > > MyObject.prototype = new DynObject(); It's so that any changes to DynObject.prototype at runtime will be reflected in MyObject.prototype > Wouldn't it be better to say: > MyObject.prototype = DynObject.prototype I guess this

Re: [Dynapi-Dev] Inheritance

2000-12-11 Thread Scott Andrew LePera
> Wouldn't it be better to say: > MyObject.prototype = DynObject.prototype I think this would cause problems when more than one object inherits from the DynObject. Using "new" ensures that the widget prototype is unique and won't be shared with other widgets that also use DynObject as their paren

Re: [Dynapi-Dev] Inheritance

2000-12-11 Thread Brandon Myers
pment List" <[EMAIL PROTECTED]> Sent: Monday, December 11, 2000 3:57 PM Subject: [Dynapi-Dev] Inheritance > > I was wondering the point of this line when inheriting objects: > > MyObject.prototype = new DynObject(); > > Wouldn't it be better to say: > MyObject

[Dynapi-Dev] Inheritance

2000-12-11 Thread Robert Rainwater
I was wondering the point of this line when inheriting objects: MyObject.prototype = new DynObject(); Wouldn't it be better to say: MyObject.prototype = DynObject.prototype Because in your MyObject constructor you will be saying: this.DynObject = DynObject; this.DynObject(); so all of the