[Proto-Scripty] Re: Class.create() and Object.clone() and methods

2010-12-23 Thread thomas.boer...@googlemail.com
HI!

Great! Thanks!

Thomas

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Class.create() and Object.clone() and methods

2010-12-17 Thread thomas.boer...@googlemail.com
HI!

When I create a class with Class.create() and add some methods like
this:

var Database = Class.create({
initialize: function() {
  this.name = ;
},
setName: function(name) {
  this.name = name;
},
});

Are the methods on the class level, as if I had declared them with
Database.prototype.methodName?

So they do not cost memory, if I use new to instantiate objects from
this class, correct?

If this is true, is it also true, if I clone such an object with
Object.clone()?

Thanks!

Thomas

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.