For CS5, Actionscript:
I have created some CharacterStyles in a document, and whoch to itterate over them in my Actionscript code, and work with the properties' values.
The problem is that in may of the cases, the properties which interest me, when accessed, throw "Error: Failed to find any class definition for com.adobe.indesign::Enumerator", and the debugger shows for them "<exception thrown by getter>".
I tried accessing them by myCharacterStyle["propertyX"] and testing for null, but that fails, too.
I also tried myCharacterStyle.hasOwnProperty("propertyX"), but that fails because the proxy class doesn't support that method.
Any ideas, aside from the ugly workaround of catching the error?
In ActionScript, you can try using the hostObjectDelegate of the object. That usually behaved more consistantly with ExtendScript objects.
I'd probably just handle this situation in ExtendScript though...
Thanks. I think that for this small and infrequent operation, <UglyWorkaround>I'll just catch the exception...</UglyWorkaround>.