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

www.microapl.co.uk

The 'oleclasses' property


Read-only, 4-column nested matrix of character vectors

Valid for: System object

The oleclasses property of the System object returns a nested matrix which gives details of the OLE Server Applications installed on your system. (The same information is also shown in the Control Browser on the Tools menu). An OLE Server Application is a program (such as Microsoft Word or Microsoft Excel) which you can invoke and control from APLX.

The returned array has one row for each OLE server application installed. However, not all of these will necessarily be usable from APLX, since they may not be designed for use from general OLE client programs such as APLX.

The first column is the plain text name, for example 'Microsoft Excel'. The second column is an alphanumeric string enclosed in curly brackets, which is the unique ID of the OCX control. The third column is the object class name, which is usually a period-delimited string giving the vendor name, object class name and optionally the version number, for example 'Excel.Application'. (The fourth column is reserved for future use).

You can use any of these as the class name to identify the control to APLX, but we recommend that you use the third.

Under MacOS and Linux, this property always returns an empty matrix because OLE is not implemented.

Example

Retrieve the list of OLE server applications installed on the system:

      OLE←'#' ⎕WI 'oleclasses'
      ⍴OLE
70 4

In this case there are a total of 70 OLE server applications installed.

If Microsoft Word is installed on the system, it should appear in the list returned by the oleclasses property:

      OLE[;1]⍳⊂'Microsoft Word'
2
      OLE[2;]
 Microsoft Word {000209FF-0000-0000-C000-000000000046} Word.Application

You can use any of the three strings to identify the control. The following sequences are all equivalent - they each invoke Microsoft Word and create an APLX object called 'WORD' which has properties and methods associated with it:

(a) Use the plain name to identify the OLE Server Application:

      WORD←'⎕' ⎕NEW 'Microsoft Word'

(b) Use the unique class ID:

      WORD←'⎕' ⎕NEW '{000209FF-0000-0000-C000-000000000046}'

(c) Use the object class name (recommended):

      WORD←'⎕' ⎕NEW 'Word.Application'

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