I’ll try to answer your two questions.
Whenever you have questions, check the framework documentation. You said the following "what I couldn’t really understand was cp.call" here’s the link to the entire description of what the call method does http://cpaint.sourceforge.net/doc/frontend.class.cpaint.call.html.
As for doubt "What type of var cp"
In javascript (as already said) there are few reserved types. It is quite different from compiled languages like C#, Java and etc.
So the type of var cp would be "Object", make a simple test to prove this.
function Carro() {
var teste = "";
}
var meucarro = new Carro();
console.log(typeof meucarro);
The answer will be "Object" and not Car (as it would be in many languages like java and C# for example).
But within the variable meucarro there is an instance of Car. In other words, the variable meucarro has the same behaviors as Car, being possible to make use of all its methods and operations.
I hope I helped you.
Take a look at this link
– Jéf Bueno
The guy will be
object
. JS is not C#, so there are few types. Have some more specific doubt or is this all you want to know?– Maniero
@bigown, what I couldn’t really understand was cp.call. What function or something it’s calling? Because of what I’m doing here, I was flying.
– pnet
@Jéfersonbueno, okay, when you get home if you don’t find an answer here, I’ll take a look. Here in the company this link is blocked by security policy.
– pnet
@Cesarmiguel, this is normal
– Jéf Bueno