[Helma-user] accessing type.properties

Joshua Paine joshua at papercrown.org
Wed Jul 2 19:17:41 CEST 2008


You can get all your object's type's properties like this:

function getTypeProperties(){
   var hash = {}, name, names, props;
   props = app.getPrototype(this._prototype.toString())
     .getTypeProperties();
   names = props.propertyNames();
   while(names.hasNext() && (name = names.next()))
     hash[name] = props.getProperty(name);
   return hash;
}

Unfortunately the original getTypeProperties returns a hash-like 
structure, so as far as I can tell there's no way to get them in order. 
Does anyone know if there is a way to get the types properties in their 
original order without reading the file?




More information about the Helma-user mailing list