Adobe 27510753 Scripting Guide - Page 66
ExtendScript Reflection Interface, Reflection Object
![]() |
UPC - 718659445294
View all Adobe 27510753 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 66 highlights
58 Using ExtendScript Tools and Features Adobe InDesign CS2 Scripting Guide Prop Class Name A second reference count for the number of properties that reference the object. The garbage collector uses this count to break circular references. If the reference count is not equal to the number of JavaScript properties that reference it, the object is considered to be used elsewhere and is not garbage collected. The class name of the object. The name of the object. This name does not reflect the name of the property the object has been stored into. The name is mostly relevant to Function objects, where it is the name of the function or method. Names in brackets are internal names of scripts. If the object has an ID, the last column displays that ID. ExtendScript Reflection Interface ExtendScript provides a reflection interface that allows you to find out everything about an object, including its name, a description, the expected data type for properties, the arguments and return value for methods, and any default values or limitations to the input values. Reflection Object Every object has a reflect property that returns a Reflection object that reports the contents of the object. You can, for example, show the values of all the properties of an object with code like this: var f= new File ("myfile"); var props = f.reflect.properties; for (var i = 0; i < props.length; i++) { $.writeln('this property ' + props[i].name + ' is ' + f[props[i].name]); } Reflection object properties All properties are read only. description String help String methods name properties Array of ReflectionInfo String Array of ReflectionInfo Short text describing the reflected object, or undefined if no description is available. Longer text describing the reflected object more completely, or undefined if no description is available. An Array of ReflectionInfo Objects containing all methods of the reflected object, defined in the class or in the specific instance. The class name of the reflected object. An Array of ReflectionInfo objects containing all properties of the reflected object, defined in the class or in the specific instance. For objects with dynamic properties (defined at runtime) the list contains only those dynamic properties that have already been accessed by the script. For example, in an object wrapping an HTML tag, the names of the HTML attributes are determined at run time.
![](/manual_guide/products/adobe-27510753-scripting-guide-5f6265c/66.png)