Mathieson
04-19-2009, 09:00 PM
Is there a way to test if a variable is read only? I am trying to do mass amounts of getProperty/setProperty calls using getPropNames, but some of the properties I'm running into are read only. I'd rather be able to do a simple automated test rather than manually excluding property names or falling back on a try/catch. A try/catch might be the way to go, but I want to avoid it if possible because of the slowdown (noticing major slowdown already and I'm testing on something very small in comparison to what I'm planning to be using this for).
I asked something similar in the past about making sure the value type being assigned to a property is actually valid, and the best solution seemed to be parsing the stream value returned by showProperties. I'm not sure this will work in this situation because of inconsistencies between the formatting of showInterfaces and showProperties. I think read|write is missing all together from showProperties actually.
Anyways, any suggestions would be great. Thanks!
I asked something similar in the past about making sure the value type being assigned to a property is actually valid, and the best solution seemed to be parsing the stream value returned by showProperties. I'm not sure this will work in this situation because of inconsistencies between the formatting of showInterfaces and showProperties. I think read|write is missing all together from showProperties actually.
Anyways, any suggestions would be great. Thanks!
