Chapter Contents

Previous

Next
SAS Companion for the Microsoft Windows Environment

Invoking OLE Verbs

Each OLE object (except OLE controls) has a default action that it performs when you double-click on it. For many objects, the default action is Edit (invoking a visual editing session for OLE 2.0 or an open editing session for linked objects and all OLE 1.0 objects). However, there are some objects for which the Edit action is secondary (for example, a Media Clip object, where Play is the primary action). Also, many objects have more than one action that they can perform, so they understand more than one OLE verb. (Note that double-clicking on an OLE object in BUILD: DISPLAY mode does not perform the default action, but double-clicking on the object in TESTAF mode does.)

To access the menu of OLE verbs for an OLE object in BUILD mode, click on the object with the right mouse button. The name of the OLE object is located at the bottom of the pop-up menu. In the cascading menu off that item, there is a list of valid OLE verbs for the object. Select a verb from this menu to perform that action. The default verb appears first in the list of verbs.

For example, a Microsoft Excel object understands Edit (for visual editing) and Open (for open editing). A Media Clip object understands Play and Edit.

You can also access the list of valid verbs by clicking on the Associated Verbs... item in the Object Attributes dialog box for the object. This list just contains the names of the verbs; you cannot initiate the verbs from here. Again, the verb at the top of the list is the default verb.

Using SCL, you can invoke any verb that a particular OLE object understands by using the _EXECUTE_ method with the verb as an argument. For example, this code would invoke the verb Play on the OLE object mediaobj:

call notify('mediaobj', '_EXECUTE_', 'Play');

You can specify multiple verbs in a single call to _EXECUTE_. For more information about the _EXECUTE_ method, see _EXECUTE_.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.