The array approach was one of my first solutions (except I was using split with a single string). But to make the code more meaningful I also defined an enumeration to index the array.
This allowed me to say things like
docXMLProp(<propertyname>)
Which still leaves what should be a constant writable. So I made the array behave like a constant by putting it in a class. That leaves me with the choice of one get statement per enumeration value
docXMLProp.<propertyname>
or a single get property with a case statement to allow the form
docXMLProp.item(<propertyname>) or
docXMLProp(<propertyname>)
if you go through the rigamarole of exposting the class, setting the default property as item then reimporting.
|