I do:
Var MyClass = function() {
This.initialize.apply(this, arguments);
}
MyClass.staticMethod = function () {
}
MyClass.prototype = {
PrivValue: null,
Initialize: function (param) {
Console.log("hello world");
},
PrivMethod: function(param) {
This.PrivValue=param;
}
}
Sorry by the uppercase this and initialize, i write by my mobile.
El martes 24 de mayo de 2011, vapour <[email protected]> escribió:
> I prefer to the under style:
> var templateManager = (function () {
> var templates = {};
>
> function supplant(str, params){
> for (var prop in params) {
> str = str.split('{' + prop + '}').join(params[prop]);
> }
> return str;
> }
>
> return {
> render: function (name, params) {
> if (typeof templates[name] !== 'string') {
> throw 'Template ' + name + ' not found!';
> }
> return supplant(templates[name], params);
> },
> defineTemplate: function (name, template) {
> templates[name] = template;
> }
> };
> })();
>
>
> --
> To view archived discussions from the original JSMentors Mailman list:
> http://www.mail-archive.com/[email protected]/
>
> To search via a non-Google archive, visit here:
> http://www.mail-archive.com/[email protected]/
>
> To unsubscribe from this group, send email to
> [email protected]
>
--
El Tio ~ Programador, hacker y filósofo
web: http://blog.exodica.com.ar
Linked'in: http://www.linkedin.com/in/ogentilezza
Twitter: @exos <http://twitter.com/exos>, Indeti.ca:
@exos<http://identi.ca/exos>
Tels: [+54 11] 638-LINUX (54689) - [+54 9 11] 6799-4797
--
To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/[email protected]/
To search via a non-Google archive, visit here:
http://www.mail-archive.com/[email protected]/
To unsubscribe from this group, send email to
[email protected]