P
petermichaux
Hi,
What is the "approved" way to (almost) ensure that my library classes
and objects don't conflict with others that I might use?
I could prepend a string fragment to the name of everything
function Peter_MyClass(){
// init Peter_MyClass objects
}
var peter_myObj = new Peter_MyClass();
Or I could create an class that contains everything in my library. I'm
not sure how this is done. Maybe like this?
function Peter(){}
Peter.MyClass = function(){
// init MyClass objects
};
Peter.myObj = new Peter.MyClass();
Any thoughts about these two methods or another suggestion greatly
appreciated.
Thank,
Peter
What is the "approved" way to (almost) ensure that my library classes
and objects don't conflict with others that I might use?
I could prepend a string fragment to the name of everything
function Peter_MyClass(){
// init Peter_MyClass objects
}
var peter_myObj = new Peter_MyClass();
Or I could create an class that contains everything in my library. I'm
not sure how this is done. Maybe like this?
function Peter(){}
Peter.MyClass = function(){
// init MyClass objects
};
Peter.myObj = new Peter.MyClass();
Any thoughts about these two methods or another suggestion greatly
appreciated.
Thank,
Peter