Topic: APLX Help : System Classes : Properties : contents
[ Previous | Next | Contents | Index | APL Home ]

www.microapl.co.uk

The 'contents' property


Character vector

Valid for: Browser, OLEContainer. System

System object

For the System object, the contents property represents the contents of the clipboarrd as an APL array. For example, you can copy a range of cells from Excel to the clipboard, and read it into APL as a numeric or nested array. The clipboard formats which are accepted when you read this property are (in order of preference):

1. The APLX binary format, which supports any arbitrary array
2. SLK (Spreadsheet format), two-dimensional arrays only
3. CSV (Comma-Separated Variables), two-dimensional arrays only
4. TSV (Tab-Separated Variables), two-dimensional arrays only

If none of these formats is found, a text vector is returned.

If you write an array to the contents property, APLX will make the data available on the clipboard in the following formats:

1. The APLX binary format, which supports any arbitrary array but is supported by APLX only
2. HTML, as a table (two-dimensional arrays only)
3. Unicode text (monadic format of the array)

Browser

For a Browser object, the contents property is read-only. It returns a character vector (with embedded carriage returns), containing the raw HTML text of the page currently displayed in the control.

OLEContainer (Windows only)

When you read the contents property for an OLEContainer control in which a document is embedded or linked, APLX returns a character vector containing the internal representation of the document (or the link) in the container. It is encoded as a series of bytes, and includes information about the type of the document as well as its contents.

You should never change the contents of this vector, but you can store it in a file and write the same vector back to an OLEContainer control to cause it to re-display the same document. This has the effect of starting up the OLE server application associated with the document.

If there is no document loaded, reading contents returns an empty vector.

If you write an empty vector to contents, a dialog is displayed inviting the user to select a document to embed or link in the OLEContainer.


Topic: APLX Help : System Classes : Properties : contents
[ Previous | Next | Contents | Index | APL Home ]