PropRegistryDoc.tioga
Kenneth A. Pier, July 6, 1992 3:58 pm PDT
PropRegistry
CEDAR 10.1 % FOR INTERNAL XEROX USE ONLY
PropRegistryDoc
Property registration and property manipulation tool in Cedar
Ken Pier
Ó Copyright 1991, 1992 Xerox Corporation. All rights reserved.
Abstract: Many editors allow properties to be attached to editable objects. Other modules, such as EmbeddedButtons, use object properties to implement functionality. The PropRegistry is a simple registration mechanism for editors that wish to allow other applications to get, set, remove, and list properties on their objects. One application, the PropTool, is implemented as a user interface to properties. The Tioga editor property registration is also implemented here for immediate use by the PropTool.
Created by: Ken Pier
Maintained by: Ken Pier <Pier:PARC:Xerox>
Keywords: properties, registration, EmbeddedButtons
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
1. PropRegistry
See PropRegistry.mesa. It defines a registry class object with class "methods" to get, set, remove, and list properties from viewers of a "named" class. The registry class name should be identical to the viewer class name for which these methods are being registered. See TiogaRegistryImpl for example. Clients of PropRegistry can obtain the class methods by calling PropRegistry.GetRegistered[name] with the class name found in the ViewerClass of the client viewer.
There are optional methods which allow clients of PropRegistry to get, set, and validate targets in a given viewer. Targets are generalizations of selections and are represented in class-specific ways. See TiogaRegistryImpl for example.
2. PropTool
PropTool is a simple tool which, when cooperating editors are running, allows users to see and manipulate properties of editor objects represented as ROPES. When PropTool starts its viewer looks like:
[Artwork node; type 'Artwork on' to command tool]
Words in large type followed by ! are buttons. Immediately to the right of buttons are their like-named viewers. These buttons are:
Notes!: clears the Notes viewer. The Notes viewer is a status viewer sort of like the MessageWindow for the PropTool.
List!: loads the List viewer with what appears to be a list of the currently selected object(s) properties. The properties appear in italic type. Each property is in fact a button which, when pressed, stuffs its name into the Get viewer and initiates a Get. For non-Tioga viewers, lists the properties of the currently selected object(s) in the viewer which has the input focus. Sends status to the Notes viewer.
Get!: loads the value of the property in the Name viewer into the Value viewer. Sends status to the Notes viewer.
Set!: sets the value of the property in the Name viewer to the value in the Value viewer. Sends status to the Notes viewer.
Remove!: removes the property in the Name viewer from the currently selected objects. Sends status to the Notes viewer.
Retarget!: attempts to restore the selection to what it was when the last operation was performed. All bets are off if the document in which that selection occurred has been edited. The idea of Retarget is that a selection is made, a Get or List performed, and the value is edited in preparation for a Set. At this point, the input focus and the Tioga selection are in the PropTool, not on the objects whose properties are to be modified. Clicking Retarget! will attempt to reselect the desired target.
Retry!: Retry! is an accelerator which is equivalent to Retarget! followed by invoking the last operation you tried. It is a way to recover from forgetting to click Retarget! before invoking Set!, which will result in an error message to the effect that the input focus is in the PropTool instead of where you want it.
At the bottom of the tool (not shown in picture above) is a typescript which is a history of PropTool operations and results and may be useful for finding or modifying many properties at once.
A PropTool with something useful in it looks like:
[Artwork node; type 'Artwork on' to command tool]