TOC PREV NEXT INDEX DOC LIST MASTER INDEX



Examples


List of Checked Out Files

The following is a standalone Apex Shell script which given views or configurations as arguments finds the files within them that are Checked_Out or privately Checked_Out

Changing the foreach body in the function to the following, finds files which are out of date with respect to the last Checked_In version.


Show Directory Tree

The following script outputs a directory tree given a directory name as an argument.

This script is an example of simulated recursion using Apex Shell. Although function recursion is directly supported, Apex Shell objects always have global scope. The expand_directory function overcomes this limitation by changing the name of the file object at each level of recursion.


Propagate Switches

The following is a standalone Apex Shell script which propagates switch values from a source view to target views.

The source can also be a configuration in which case the targets should be simple view names and it will be done for all views in the configuration to each of the targets.

The switches to propagate are specified with a command line option Only switches which occur in both the source view and the target view and which are different in the target view are changed.


List an Executable's Sources


Reduce Items to a Set of Views

The following is an example of a Menu_Item action written in Apex Shell which runs off of a directory window.

Given a set of selected items (or the current window's context) it reduces that set to the set of views named or implied and visits any Code_Rule files that those views have.


Sample Dialog Box

The following is a dialog box done with Apex Shell.

The following is the exec prog from the File > New > View dialog

Server/Client Applications

This function is used in the examples below to connect to an Apex session. It creates and returns the name of a "connection" object.

Sending a message to the Message_Server

Sending messages to the Text_Server and Directory Server

These examples are of sending messages to the Text_Server and Directory_Server at the request level. These examples could be done more simply with subcommands of Apex_Display.

Shell script that runs as an Apex server

Shell script that runs as a general server waiting for requests

Shell script that sends requests to the above kind of server


Rational Software Corporation 
http://www.rational.com
support@rational.com
techpubs@rational.com
Copyright © 1993-2001, Rational Software Corporation. All rights reserved.
TOC PREV NEXT INDEX DOC LIST MASTER INDEX TECHNOTES APEX TIPS