November 2007 Archives

A Shortcut for Inserting SOM Expressions into your Script

| 2 Comments

The XFA scripting model can be a bit... overwhelming... sometimes.  It can be hard to figure out what SOM expression you need need to use.  But there is an alternative to typing out a long, many-layered-SOM-expression.  While typing in the script editor, if you hold down the CTRL key and click on an object on the canvas, the object's SOM expression will be inserted into your script.  The SOM expression will be relative to the object hosting the script. 

If you want the absolute SOM, then hold down CTRL+SHIFT and click on the object.

Please note that this trick only works when clicking on objects on the canvas, not in the hierarchy dialog.

xfa.host.setFocus()

| 2 Comments

Did you know that starting with version 8.1, the setFocus() method can accept either a SOM expression or a node object?

For example,

xfa.host.setFocus(this);

xfa.host.setFocus(this.somExpression);

About this Archive

This page is an archive of entries from November 2007 listed from newest to oldest.

October 2007 is the previous archive.

May 2008 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Categories

Pages

Powered by Movable Type 4.261