function getMyProperty1()
{
return(this.meProperty1);
}
function getMyProperty2()
{
return(this.meProperty2);
}
usw…
Als naechstes instanzierst Du ein Object obiger Klasse:
var oMyClass = new cMyClass();
Nun kannst du die Instanz der Klasse abfragen und gegebenefalls auf die Members bzw. Memberfunctions zugreifen:
if (oMyClass) {
var theProperty1 = oMyClass.getProperty1();
var theProperty2 = oMyClass.getProperty2();
}
Allerdings gibt es bis dato in Javascript 1.4 noch kein public, private, protected, inline, mutable, friend, static, usw.
Geht also praktisch auch immer so:
if (oMyClass) {
var theProperty1 = oMyClass.meProperty1();
var theProperty2 = oMyClass.meProperty2();
}