Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #8259

Re: JavaScript: Object Definition Extension

From Denis McMahon <denismfmcmahon@gmail.com>
Subject Re: JavaScript: Object Definition Extension
Newsgroups comp.lang.javascript
References <887pb7titjugv9u6j6tiv9cjpdv8t6div7@4ax.com> <4ebe5e58$0$3173$426a74cc@news.free.fr>
Date 2011-11-12 16:04 +0000
Message-ID <4ebe98f1$0$28586$a8266bb1@newsreader.readnews.com> (permalink)
Organization readnews.com - News for Geeks and ISPs

Show all headers | View raw


On Sat, 12 Nov 2011 12:53:57 +0100, Elegie wrote:

> function RealEstate(PropertyLocation, PropertyValue) {
>    this.PropertyLocation=PropertyLocation;
>    this.PropertyValue=PropertyValue;
> }
> 
> function Commercial (PropertyZoning, PropertyUse) {
>    this.PropertyZoning=PropertyZoning;
>    this.PropertyUse=PropertyUse;
>    }
> 
> Commercial.prototype=new RealEstate("Kamloops",150000);
> 
> var Prop1=new Commercial("C-1","light commercial"); ---

Wouldn't that mean that all Commercial properties have the same location 
and value?

I think the OP wants to be able to assign different locations and values 
to different commercial properties.

eg: http://www.sined.co.uk/tmp/objects.htm

I'm sure that someone will be along soon to tell us that I've done it 
wrong, although he won't actually go so far as to post "the right way", 
because he much prefers to criticise the coding of others than to expose 
his own code to critical comment.

Rgds

Denis McMahon

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

JavaScript: Object Definition Extension Gene Wirchenko <genew@ocis.net> - 2011-11-10 20:02 -0800
  Re: JavaScript: Object Definition Extension "Evertjan." <exjxw.hannivoort@interxnl.net> - 2011-11-11 08:49 +0000
  Re: JavaScript: Object Definition Extension beegee <bgulian@gmail.com> - 2011-11-11 05:40 -0800
    Re: JavaScript: Object Definition Extension John G Harris <john@nospam.demon.co.uk> - 2011-11-11 20:11 +0000
      Re: JavaScript: Object Definition Extension Gene Wirchenko <genew@ocis.net> - 2011-11-11 21:02 -0800
        Re: JavaScript: Object Definition Extension John G Harris <john@nospam.demon.co.uk> - 2011-11-12 16:46 +0000
          Re: JavaScript: Object Definition Extension Gene Wirchenko <genew@ocis.net> - 2011-11-14 12:26 -0800
            Re: JavaScript: Object Definition Extension beegee <bgulian@gmail.com> - 2011-11-15 06:49 -0800
              Re: JavaScript: Object Definition Extension beegee <bgulian@gmail.com> - 2011-11-15 09:47 -0800
            Re: JavaScript: Object Definition Extension John G Harris <john@nospam.demon.co.uk> - 2011-11-15 15:43 +0000
              Re: JavaScript: Object Definition Extension Gene Wirchenko <genew@ocis.net> - 2011-11-15 10:31 -0800
                Re: JavaScript: Object Definition Extension Jake Jarvis <pig_in_shoes@yahoo.com> - 2011-11-15 23:35 +0100
                Re: JavaScript: Object Definition Extension John G Harris <john@nospam.demon.co.uk> - 2011-11-16 20:42 +0000
      Re: JavaScript: Object Definition Extension beegee <bgulian@gmail.com> - 2011-11-12 09:35 -0800
        Re: JavaScript: Object Definition Extension John G Harris <john@nospam.demon.co.uk> - 2011-11-13 11:40 +0000
          Re: JavaScript: Object Definition Extension beegee <bgulian@gmail.com> - 2011-11-13 11:53 -0800
            Re: JavaScript: Object Definition Extension John G Harris <john@nospam.demon.co.uk> - 2011-11-14 16:19 +0000
              Re: JavaScript: Object Definition Extension beegee <bgulian@gmail.com> - 2011-11-15 10:02 -0800
  Re: JavaScript: Object Definition Extension Elegie <elegie@anonymous.invalid> - 2011-11-12 12:53 +0100
    Re: JavaScript: Object Definition Extension Denis McMahon <denismfmcmahon@gmail.com> - 2011-11-12 16:04 +0000
      Re: JavaScript: Object Definition Extension John G Harris <john@nospam.demon.co.uk> - 2011-11-12 18:14 +0000
        Re: JavaScript: Object Definition Extension Denis McMahon <denismfmcmahon@gmail.com> - 2011-11-13 19:34 +0000
      Re: JavaScript: Object Definition Extension Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-11-12 19:31 +0100
      Re: JavaScript: Object Definition Extension Gene Wirchenko <genew@ocis.net> - 2011-11-13 20:33 -0800
    Re: JavaScript: Object Definition Extension John G Harris <john@nospam.demon.co.uk> - 2011-11-12 16:52 +0000
      Re: JavaScript: Object Definition Extension Elegie <elegie@anonymous.invalid> - 2011-11-12 20:49 +0100
        Re: JavaScript: Object Definition Extension Gene Wirchenko <genew@ocis.net> - 2011-11-13 20:21 -0800
          Re: JavaScript: Object Definition Extension Elegie <elegie@anonymous.invalid> - 2011-11-14 10:20 +0100

csiph-web