OLE and the SAS System for Windows Release 6.12

OLE and the SAS System for Windows Release 6.12

OLE and the SAS System for Windows Release 6.12 Jennifer Clegg and Carol Rigsbee, SAS Institute Inc., Cary, NC ABSTRACT information about its use within the SAS System. This paper describes the OLE support within the SAS System for Windows Release 6.12. This support includes BASIC CONTAINER SUPPORT OLE container, OLE automation con- troller, and OLE automation server func- Overview of OLE tionality. OLE container and OLE con- The SAS System’s basic container sup- troller support is available in SAS/AF ports the creation of Linked and Embed- FRAME entries and SAS/EIS applica- ded objects, drag and drop, and visual tions. OLE automation server support is editing. available with base SAS software. Objects can be Linked or Embedded de- pending on your needs. Use Linked ob- INTRODUCTION jects when you want the data in the con- tainer to update dynamically when the This paper provides an overview of the source changes. Use Embedded objects OLE support in the SAS System. For if you want to edit the object within the more details on OLE in general, see the container or if a link would be unavail- documentation for the Microsoft Win- able later. dows operating environment. For further details on OLE support within the SAS Drag and drop provides an easy way to System, refer to the online documenta- create an Embedded or Linked object tion for the SAS Companion. within a container. Drag and drop sup- ports keyboard modifiers to alter the be- OLE facilitates the exchange of informa- havior of a drop. By default, dragging tion between applications. OLE contain- an object moves the object. To copy an ers include objects and controls from object, hold down the Ctrl key when you other applications. Through OLE auto- drop the object in the container. The mation, OLE controllers script objects in cursor will change to an arrow with a other applications. OLE servers are the box and a plus (+) sign. To create a link applications that provide these objects. to the object data, hold down the Ctrl and Shift keys when you perform the OLE functionality within the SAS Sys- drop. The cursor will become an arrow tem falls into three categories: basic with a box and an equals (=) sign. If the container support, OLE automation sup- target area is not a valid drop site or the port, and OLE controls support. Each operation is not supported, the cursor section of this paper discusses the par- will change to the not (∅) sign. ticular OLE feature followed by specific Visual editing allows you to edit an ob- gion to designate the size of the object. ject within the context of its container. When using MAKE, the server determines The container takes on the user interface the default size of the object. For bitmaps of the server. The menus, toolbars, and and other objects that do not scale well, status line switch to the ones normally MAKE is preferable because the object re- provided by the server. Below is an ex- tains its appearance. ample of a Microsoft Word object being visually edited in the SAS container. The SAS System creates HSERVICE entries in SAS Catalogs to store the nec- essary information about Linked and Embedded objects. These entries are only portable to other Windows plat- forms. Creating OLE Objects in FRAME One of the ways you can create OLE objects in FRAME is to use the Insert Object dialog. To access this dialog, se- Not all servers support visual editing. lect MAKE or FILL from the frame’s Some servers may support open editing popup menu. Scroll through the list of where the server launches as a separate items and select OLE - Insert Object. application and all editing occurs in that The dialog is below. application’s window. By design, Linked objects only support open editing. Em- bedded objects may support visual edit- ing or open editing depending on the server. Overview of OLE and the SAS System There are multiple ways to create Em- bedded and Linked objects with the SAS Notice that there are three radio buttons System. First, you need to bring up the in this dialog. The first one is Create SAS BUILD:DISPLAY window so you New. Selecting this button will display a can create a FRAME entry that will list of available object types. This list contain your OLE objects. To do this will vary based on the OLE-capable ap- submit the following statement: plications on your machine. Selecting an proc build c=sasuser.ole.demo.frame; run; object type from this list and pressing OK will result in the creation of an Embed- To create OLE objects you can select ded object. Since this is a new instance FILL or MAKE from the frame’s popup of an object, the server starts the object menu. To access the popup menu, posi- in edit mode, either visual editing or open tion your mouse in the BUILD window editing, depending on what the server and click the right mouse button. When supports. Click outside the object, else- using FILL, you must first drag out a re- 2 where on the frame, to end visual editing. Metafile, Device Independent Bitmap, or Exit the server to end open editing. Bitmap. Select the desired choice and click the Paste button to create any If you select the second radio button, type of object except Linked. You must Create from File, the dialog allows select the Paste Link radio button to you to create an object based on the create a Linked object. Metafile, Device contents of a file. The dialog prompts Independent Bitmap, and Bitmap are all you for the filename. The Insert Object static data representations of an object. dialog with this option selected is below. You may view these objects in a con- tainer but not edit them. Another way to create an object is to read an existing object from a SAS cata- log. To read an object from a catalog select OLE - Read Object from the MAKE or FILL menus. Enter the HSERVICE entry name of the object you want to read. Reading an object If you do not know the filename, you can from a catalog is equivalent to copying browse for the file to use to create this an object. This method allows you to ac- object. Using this method will create an cess objects in other frames. You must Embedded object based on the contents change the name of the HSERVICE en- of the file. To create a Linked object, try in the Object Attributes dialog after click the Link check box to select it. you create the object if you want to save the object as a separate catalog entry. The OLE Controls section describes the third radio button, Insert Control. You can also use drag and drop to create a new object based on an existing object Another way to create a Linked or Em- or data in an application. bedded object is to use the Paste Special dialog. This dialog is available from the OLE Verbs MAKE or FILL menus as OLE - Paste One important feature of OLE objects is Special. that they expose verbs. Verbs are ac- tions that can be performed on an object. Each OLE object has a default verb as- sociated with it. Most objects expose “Edit” as the default verb. Some objects, such as media clip, expose “Play” as the default verb. The default verb is impor- tant because double-clicking an object in TESTAF executes this action. Most ob- jects have more than one verb. The Paste Special dialog allows you to create an object based on data from the To access all the verbs for an object in clipboard. You may create objects of the BUILD, click on the object with the right following types: Embedded, Linked, 3 mouse button to access the frame’s date of a link, edit the source of a link, or menu. The name of the OLE object is break a link. Breaking the link will the last item on the menu. This menu change the object to a static representa- contains a list of selections available with tion. The Links dialog displays all this object. Below is a fragment of the Linked objects in the current frame. You frame’s menu showing the object’s menu. can access the Links dialog by typing DLGLINKS on a command line or by using SCL to pass DLGLINKS as a verb to the object using the _EXECUTE_ method. In BUILD you can also access the Links dialog from the object’s menu. The first set of selections (before the separator) is the list of verbs. The first selection is the default verb. You can select any of these verbs to execute that The Convert dialog allows you to specify action. Additional selections available an alternate editor for an object when the from this menu include the Links and original server is unavailable. If you Convert dialogs. convert an object, it permanently be- comes an object of the new type. You You can also view the list of verbs for an can also use this dialog to activate an object by invoking the Object Attributes object as an object of another type. The dialog and selecting the Associated storage for the object is unaltered and all Verbs item. Using SCL, you can pro- objects of this type on your system will grammatically execute verbs using the now use the new application for editing. _EXECUTE_ method. An example is Conversion and activation support de- below: pends on the servers installed on your system.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    10 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us