Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional JavaScript for Web Developers 3rd edition
This is the forum to discuss the Wrox book Professional JavaScript for Web Developers, 3rd Edition by Nicholas C Zakas; ISBN: 978-1-1180-2669-4
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional JavaScript for Web Developers 3rd edition section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old November 10th, 2015, 10:23 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Smile problem with combination inheritance

in chapter 6.3.3 combination inheritance sample.
in the code "SubType.prototype.constructor = Subtype"
why not "Subtype.protytype.constructor = SuperType"?
Reply With Quote
  #2 (permalink)  
Old September 18th, 2016, 01:22 AM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by leejim View Post
in chapter 6.3.3 combination inheritance sample.
in the code "SubType.prototype.constructor = Subtype"
why not "Subtype.protytype.constructor = SuperType"?
you can see 6.3.1

the previous SubType.constructor is Function SubType; but now SubType is the instance of SuperType, "SuperType.constructor = SuperType" is just equal to "SubType.prototype.constructor = SuperType";

So if you do "SubType.protytype.constructor = SuperType", there will no change;

But, In my view, I think this“SubType.prototye = SubType” is not important, for
"SuperType.call(this, name);" is always work.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in Checkbox Combination & sorting method.. akshaymehta007 Classic ASP Professional 0 December 28th, 2007 01:32 AM
inheritance problem kaos_frack BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 1 March 25th, 2007 10:28 AM
Problem With Inheritance jazzcatone ASP.NET 2.0 Basics 1 April 23rd, 2006 12:33 PM
Inheritance problem flyin General .NET 2 May 20th, 2004 11:55 AM
Vectors/inheritance problem hpy_gilmore8 C++ Programming 1 February 23rd, 2004 08:21 PM



All times are GMT -4. The time now is 02:00 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.