EDOBE XDOM TAKE 6 IR - PRODUCTSHEET Especificações Página 222

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 304
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 221
CHAPTER 8: ExtendScript Tools and Features ExtendScript reflection interface 222
Examples
This code determines the class name of an object:
obj = new String ("hi");
obj.reflect.name; // => String
This code gets a list of all methods:
obj = new String ("hi");
obj.reflect.methods; //=> indexOf,slice,...
obj.reflect.find ("indexOf"); // => the method info
This code gets a list of properties:
Math.reflect.properties; //=> PI,LOG10,...
This code gets the data type of a property:
Math.reflect.find ("PI").type; // => number
ReflectionInfo object
This object contains information about a property, a method, or a method argument.
X You can access ReflectionInfo objects in a Reflection object’s properties and methods arrays, by
name or index:
obj = new String ("hi");
obj.reflect.methods[0];
obj.reflect.methods["indexOf"];
X
You can access the ReflectionInfo objects for the arguments of a method in the arguments array of
the
ReflectionInfo object for the method, by index:
obj.reflect.methods["indexOf"].arguments[0];
obj.reflect.methods.indexOf.arguments[0];
Vista de página 221
1 2 ... 217 218 219 220 221 222 223 224 225 226 227 ... 303 304

Comentários a estes Manuais

Sem comentários