WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 Adding functions with object prototyping, Micha Schopman, September 29, 2003
     Re:Adding functions with object prototyping, Wellington, September 29, 2003
         Re:Adding functions with object prototyping, Micha Schopman, September 29, 2003
         Re:Adding functions with object prototyping, Micha Schopman, September 29, 2003
             Re:Adding functions with object prototyping, Erik Arvidsson, September 30, 2003
             Re:Adding functions with object prototyping, Wellington, September 29, 2003

Subject: Re:Adding functions with object prototyping From: Wellington Date: September 29, 2003
What happens is that the this of  the "this.remove" refers to the newNode object, which does not possess the method removes, nor nothing of the class node, but is really another class and object. Soon for that execute must be kept the true "this" in the created newNode object.
It explains the line: this.newNode.obj = this; and the use of it.
 
From: Micha Schopman
Sent: September 29, 2003
Subject: Re:Adding functions with object prototyping

it is a bit confusing for me what happens with this

this.newNode.obj = this;

I do not really get why something like

this.newNode.onclick = new Function("this.remove()");

does not work. When you see it like this, you expect you make a reference to node.remove(); But after all you could expect this.remove references to the div it is appended to.

I guess it is a mather of thinking to difficult. Quite annoying actually..




Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX