7.6

Table Of Contents
PlanetPress Talk Before and After
The properties for all documents, pages and objects contain two sections named "PlanetPress Talk Before"and "PlanetPress
Talk After", which are used to execute PlanetPress Talk code before or after the object is displayed on the page.
Specific variables are available within these boxes that can be used to obtain data about the object and to modify it, for exam-
ple for height, width and position. For more information, see the PlanetPress Talk Reference Guide.
Any object that has PlanetPress Talk code entered in either the "Before"or "After"section will be identified in the Doc-
ument Structure area in a maroon color instead of the normal black text. This color may be different and is con-
figurable in the "Color Preferences" (page 75). It is the same color as PlanetPress Talk-enabled boxes.
Create a User-Defined Emulation
When a user-defined emulation is used with metadata, results and behavior are unknown and unsupported. For
instance, refreshing the metadata file may cause the document to crash and/or corrupt. For this reason, it is strongly
advised to create backup copies of your documents beforehand.
You use PlanetPress Talk to write the code that determines how the document treats each line and where it places it in the
data page buffer. When you write a user-defined emulation, you must define any offset of the first data page in the data
stream, the data page size, the number of data pages in the data page buffer, and any conditions that signal the end of a data
page.
To set up a user-defined emulation:
1. If you have not done so already, associate a sample data file with the document.
2. Choose Tools | Open Active Data.
3. In the Data Selector, in the Emulation box, select User-defined.
4. In the Emulation options, click Use PlanetPress Talk Editor.
The Code area of the Editor contains the code for a line printer emulation. The Spy list in the Editor contains spies for
three system variables important in user-defined emulations:
Variable: Type: Contains:
&str string The current line of input data.
&current.line integer
The line number of the current line of data in the data page. This system variable is read-write
and can be modified using the set() command.
&current.lpp integer The number of lines per data page in the current data page.
5. Enter the emulation code in the Code area of the PlanetPress Talk Editor. You can use the line printer emulation code as
a starting point or delete it (highlight it and press DELETE or BACKSPACE) and start from scratch.
You can use the Object Preview to preview the result of the code you enter. If the Object Preview is not visible, in the
PlanetPress Talk Editor choose View | Preview. The Object Preview for a user-defined emulation differs from the
standard Object Preview as follows:
l It contains a Data Pane to preview each of the data pages your emulation constructs from the sample data file.
l It includes a Data page box to verify the accuracy of your emulation by moving through the data pages of the
sample data file.
l It does not contain a zoom tool.
l You refresh its contents by executing the code.
6. When you finish entering the code for the emulation, click OK to exit the Editor and return to the Data Selector.
7. Click OK.
©2010 Objectif Lune Inc - 214 -