Monday, December 26, 2005

How to Present an Object

An Object has many facets. It has a type that tells you what kind of object it is:
myObj.constructor.name;
For example, select a text frame in an InDesign document and run:
myObj = app.selection[0];
alert(myObj.constructor.name);
and you'll get an alert like this:



Notice both the absence of a space and the capitalization. A text frame object in JavaScript is a TextFrame kind of object, and yet, to refer to one, we use the spelling: textFrame. Which seems like a simple enough transformation until you run into objects like XML elements where the spelling transformation is less obvious.

Saturday, August 27, 2005

Not Yet Active

If you have stumbled upon this blog, it is not yet active. I'm using it to restore some features to the template I'm using on a different blog.