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
__
> -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
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
> -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
> 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
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
---
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
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
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
> 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
> 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
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
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
13 matches
Mail list logo