home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
rwx10.zip
/
RWX.DOC
< prev
Wrap
Text File
|
1998-01-22
|
20KB
|
540 lines
____________________________________________________________________
____________________________________________________________________
==== Rwx v1.0 - a SOM Class Explorer ====
(C) Copyright R L Walsh 1994, 1997 - All Rights Reserved
____________________________________________________________________
____________________________________________________________________
TABLE OF CONTENTS
____________________________________________________________________
o Introduction
o Using Rwx
o Menus
o Class List Window
o Class Info Window
o Install/Remove
o License Agreement
____________________________________________________________________
____________________________________________________________________
INTRODUCTION
____________________________________________________________________
Rwx v1.0 is a tool for examining System Object Model (SOM) classes
loaded by the OS/2 Workplace Shell. It is implemented as a WPS
class that can be used with all versions of OS/2 Warp v3 and v4.
Rwx can list all SOM classes in the WPS process and provide
detailed information about each, including a complete listing of
its methods. Use Rwx to better understand how a class works and
its relationship to other classes, and to identify undocumented
methods and classes. You can even use Rwx to create skeleton IDL
files for undocumented classes, enabling you to subclass them.
Rwx v1.0 is released as freeware. You may copy and redistribute
it, provided there is no charge to the end user except the costs
of media and distribution. It may not be included in "commercial"
packages without permission.
Email your comments, questions, and suggestions to the author,
Rich Walsh, at <rlwalsh@packet.net>.
____________________________________________________________________
____________________________________________________________________
USING RWX
____________________________________________________________________
Modify, then run the REXX script in the "Install/Remove" section
below to register class "Rwx" and create an Rwx object on your
Desktop. Open it to display its Class Explorer view.
Class Explorer Window
---------------------
There are two main parts, the Class List and Class Info windows,
plus navigation buttons, an icon area used for drag and drop,
and a menu.
Class List: a drop-down listing of all SOM classes currently
loaded in the WPS process, plus WPS classes that are
registered but not loaded. Options let you choose
the sort order and the classes included in the list.
Class Info: a scrollable text window that displays details for a
selected class. It identifies a class's module and
load cause; its ancestry and the number of methods
introduced by each ancestor; and, WPS-specific
details such as default view, style bits, etc. By
default, Rwx lists every method a class introduces
or overrides. You can choose to turn off the list,
or to expand it to include every inherited method.
Buttons: selection and navigation buttons for use with the
mouse or keyboard. The left arrow selects (or
reselects) a class from the list. The up and down
arrows select the previous or next class on the list.
Icon area: displays Rwx's icon at startup, and the default class
icon when a WPS class is selected. Drop a WPS object
here to display info about its class.
Menu: contains commands to refresh the Class List, lookup
a class or method name, etc, plus items for setting
defaults.
API Help
--------
If you have the WPS and/or SOM online references from the OS/2
Developer's Toolkit, you can use API Help to look up classes
and methods.
Place the cursor on the word to look up, then press Ctrl-A
or select 'Help/API help' from the menu. To look up a phrase
or part of a word, highlight the text first.
By default Rwx uses this command line to invoke online help:
VIEW WPS1.INF+WPS2.INF+WPS3.INF+SOMREF.INF [topic]
You can change the .INF files it uses by setting an RWXREF
environment variable. For example:
SET RWXREF=WPS1.INF+WPS2.INF+SOMREF.INF+SOMGUIDE.INF
Drag and Drop
-------------
Drop a WPS object on the icon area (to the left of the Class
List) to display details about its class. Rwx will identify
the object's class, then try to find its name in the Class List.
This will fail if you've excluded WPS classes from the list.
Set 'Options/Filter' to 'Show all', refresh the list, then try
again.
Copying Information
-------------------
You can use DragText or the clipboard to copy details from the
Class Info window. To copy the Class List, select 'Classes/
Copy list' from the menu. This will copy the Class List in
its current format to the Class Info window. You can then copy
selected text from there.
Fonts and Colors
----------------
Rwx saves the colors and font used by the Class Info window.
When you reopen Rwx, these colors and fonts will be applied
to both the Class List and the Class Info windows.
____________________________________________________________________
____________________________________________________________________
MENUS
____________________________________________________________________
Classes
=======
Refresh list:
[Ctrl-R] updates the list of loaded and registered classes.
Use this after changing Rwx's class listing options,
or to see if SOM has loaded or unloaded any classes
since the last refresh.
Copy list: copies the current Class List to the Class Info window;
[Ctrl-C] the list is not updated. This lets you copy part or
all of the it using DragText or the clipboard.
Load now: if the "Load on Request" option is set, you must
[Ctrl-L] select this item to view details for classes that
are not loaded currently.
Options
=======
The Sort, Filter, and Load options take effect when you select
'Classes/Refresh'. The Methods options take effect when you
select or reselect a class from the list. The Word wrap option
takes effect immediately.
Sort
----
by Parent: creates an indented hierarchical listing (default)
Alphabetically:
creates a left-justified listing of classes sorted
by name
None: classes are listed in the order SOM stores them
in its class table; this can help identify the
order in which classes were loaded.
Filter
------
Show all: every class currently loaded, plus WPS classes that
are registered but not loaded will be listed (default)
WPS only: only classes descended from WPObject are included
Exclude WPS:
classes descended from WPObject will not be listed.
Load
----
This controls whether and when Rwx loads classes not currently
in memory.
at Startup: all registered WPS classes will be loaded whenever
you open Rwx or refresh the class list; classes
that SOM unloads will be reloaded when selected
to View Details:
a class will be loaded, if necessary, when you select
it from the class listing (default)
on Request: Rwx will advise if a class is not loaded currently;
you must then select 'Classes/Load now' from the menu.
Methods
-------
Detailed: every new and inherited method available to the class
is listed; classes which have overridden a given
method are identified
Concise: every method that is introduced or overridden by the
class is listed (default)
None: no method listing is generated.
Word wrap:
--------- toggles word wrap in the Class Info window; this
[Ctrl-W] is the only option that takes effect immediately.
Help
====
API help: Select this item to display online help for the
[Ctrl-A] classes and methods shown in the Class Info window.
Rwx will lookup whatever text is selected; if nothing
is selected, Rwx will select the word at the cursor,
then look it up. You must have the online SOM and WPS
references from the OS/2 Developers Toolkit.
Product Info:
author, version, and copyright information
____________________________________________________________________
____________________________________________________________________
CLASS LIST WINDOW
____________________________________________________________________
By default, the Class List displays an indented, hierarchical
listing of every SOM class currently loaded in the Workplace
Shell process, plus additional WPS classes that are registered
but not loaded (see note below). Menu options let you sort the
list alphabetically or by load order, and exclude either WPS or
non-WPS classes.
Navigate the list by selecting a class directly or by using
the buttons next to it. The up and down arrows step through
the list; the left arrow displays (or redisplays) details for
the selected class.
Because SOM dynamically loads and unloads classes, the contents
of the Class List may change over time. Use the 'Classes/Refresh'
menu option to update the list.
Use the 'Options/Load' menu to control whether and when Rwx should
have SOM load a class that isn't currently in memory. The default
action ('to View Details') is to load a class when you select it
from the list. The "Menus" section describes the other options.
Note: The class list does not include WPObject's metaclass
(M_WPObject) or any of its descendants. Details about these
classes are displayed when you select the associated instance
class.
____________________________________________________________________
____________________________________________________________________
CLASS INFO WINDOW
____________________________________________________________________
Standard Information
====================
Items which may not appear for every class are surrounded by
parentheses.
Class: The name of this object class, as known to SOM. The
address of the class object appears to the right.
Metaclass: The class that constructs objects for the subject
class. It is always descended from SOMClass. The
address of the metaclass object appears to the right.
Parent: The class(es) from which the subject class was
derived. If the subject class has multiple parents,
each will be listed. The address of the parent
class object appears to the right.
(Replaces:) (only shown if a replacement is in effect)
Whenever SOM is asked to create an object of the class
shown here, it will create an object of the subject
class instead. This class is normally the subject's
parent; it may be different if multiple subclasses
are replacing the same parent.
Module: The fully qualified path of the DLL containing this
class. If the DLL name SOM supplies isn't valid,
the means Rwx used to identify the module is also
shown in parentheses:
- (method addr): Rwx used the address of a method
the class introduced or overrode.
- (related class): Rwx assumed that the class is
in the same file as the class that caused it to
be loaded (this may be incorrect).
If all else fails,"unknown" is displayed.
Load cause: An attempt to identify why this class was loaded;
consider this an "educated guess". You may see "WPS
registration", the name of another class, or "unknown".
If a class is shown, it may be followed by:
- (SOMInitModule): a request to load the class
shown here probably caused SOM to invoke the DLL's
SOMInitModule which then loaded the subject class.
- (descendant): the class shown here is a descendant
of the subject class; to construct a class, SOM
has to load all ancestor classes.
____________________________________________________________________
WPS-Specific Information
========================
This section appears for classes descended from WPObject. The
WPS creates additional classes not descended from WPObject, but
they are not considered "WPS classes" here.
Registered / Unregistered WPS class:
WPS registration facilitates loading classes when
objects are created or awakened, but it is not
required. There are several other mechanisms that
can cause a class to be loaded.
Title: The default name given to objects of this class.
Storage class:
The ancestor class that handles the storage of an
object's persistent data. WPFileSystem objects use
files and folders; WPAbstract objects use os2.ini.
WPTransient objects don't store their data and must
be recreated each time the system starts.
Default view:
If a specific view has not been set for an object of
this class, this view will be opened by default.
Class Style:
The default style bits given to objects of this class.
(PM_Workplace:IplLoad:) (WPFileSystem and descendents only)
The "PM_Workplace:IplLoad" entry in os2.ini identifies
classes that the WPS should load at startup and keep
in memory, rather than loading and unloading them
on demand. They are usually descendants of WPDataFile
associated with particular types of files.
(File Associations:) (WPFileSystem and descendents only)
The WPS uses this info to assign filesystem objects
to a class when they have no .CLASSINFO extended
attribute. They are assumed to be instances of the
subject class If either their names or .TYPE
extended attributes match the value(s) shown here.
____________________________________________________________________
Instance Method & Data Summary
Class Method & Data Summary
==============================
These provide a complete listing of:
- a class's ancestors
- the count of methods introduced by each class
- the size of instance data introduced by each class
The total line shows the count of methods available to instances of
the subject class, and the size of the storage required for each
instance of this class. (FYI... The total data size is always
4 bytes larger than the sum of the classes' data size.)
____________________________________________________________________
Method Listings
===============
This section's contents are controlled by the 'Options/Methods'
menu.
- None: this section will not appear;
- Concise: all methods introduced or overridden by this class
and its metaclass are listed;
- Detailed: every method available to a class and its metaclass
is listed; each class that has overridden an
inherited method is identified.
Listings for the class and metaclass follow the same format.
Methods are grouped by the class that introduced them, starting
with the subject class and working back to SOMObject. The concise
listing includes only ancestors whose methods have been overridden
by the subject class. The detailed listing includes all ancestors.
For each method, Rwx displays: its index in the class's method
table, its name, and its current entry point on your system.
On the detailed listing, classes that have overridden this method
appear to the right of the entry point. If the subject class
overrode this method, an asterisk also appears next to the index.
____________________________________________________________________
____________________________________________________________________
INSTALL/REMOVE
____________________________________________________________________
Install
=======
To install Rwx, copy this REXX script to a text editor. Change
the value of RWXPATH, save it as RWXIN.CMD, then run it. It will
register the class and create an object named Rwx on your Desktop.
--------------------------------------------------------------------
/* RWXIN.CMD - install Rwx */
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
RWXPATH = 'c:\path\RWX.DLL'
if SysRegisterObjectClass( 'Rwx', RWXPATH)
then do
if SysCreateObject( 'Rwx', 'Rwx', '<WP_DESKTOP>', 'OBJECTID=<Rwx>', 'R')
then
say 'Rwx has been registered and an Rwx object created'
else
say 'Unable to create Rwx object - Rwx class is registered'
end
else do
say 'Unable to register class Rwx! Make sure the path is correct.'
say 'It is currently set to: ' RWXPATH
rc = SysDeregisterObjectClass( 'Rwx')
end
--------------------------------------------------------------------
Remove
======
To remove Rwx, copy this REXX script to a text editor, save it as
RWXOUT.CMD, then run it. It will delete the object RWXIN created,
then it will deregister Rwx.
--------------------------------------------------------------------
/* RWXOUT.CMD - remove Rwx */
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
if SysDestroyObject( '<Rwx>')
then
say 'Rwx object deleted'
else
say 'Unable to delete Rwx object'
if SysDeregisterObjectClass( 'Rwx')
then
say 'Rwx class deregistered'
else
say 'Unable to deregister Rwx class'
--------------------------------------------------------------------
____________________________________________________________________
____________________________________________________________________
LICENSE AGREEMENT
____________________________________________________________________
Rwx is the copyrighted property of Richard L. Walsh. It is licensed,
not given, to you at no cost for your personal use.
You may copy and freely redistribute Rwx to others, provided:
-the recipient agrees to the terms of this license,
-you transfer Rwx as a whole and intact,
-there is no cost to the recipient other than the costs
of providing media and transmission, and
-it is not redistributed in conjunction with any software
that may not also be freely redistributed by the recipient.
You may not modify Rwx in any way nor may you reverse assemble,
reverse compile, or otherwise translate or reverse engineer its
executable code or data.
Rwx is not warranted to be free of defects nor to be suitable for
any particular purpose the licensee may put it to. The licensee
agrees to use Rwx at his or her own risk, and agrees to accept
all liabilities arising from its use, including all claims by
third parties, without recourse to the author or copyright holder.
THERE ARE NO WARRANTIES, EXPRESS OR IMPLIED, OF ANY SORT.
BY YOUR USE OF THE PROGRAM YOU AGREE TO THE TERMS OF THIS LICENSE.
____________________________________________________________________
____________________________________________________________________
Rich Walsh <rlwalsh@packet.net>
Ft Myers, Florida
Jan 22, 1997
____________________________________________________________________
=== Have you tried DragText yet? ===
DragText lets you handle text as an object by adding
drag and drop text to commonly used windows systemwide.
Visit http://www.usacomputers.net/personal/rlwalsh/
for more information. DragText v2.5 is also available
from many popular FTP sites as drgtxt25.zip.
____________________________________________________________________
____________________________________________________________________