FeedbackOpsDoc.tioga
Bier, September 1, 1989 11:19:59 am PDT
Last tweaked by Mike Spreitzer on May 3, 1990 11:08:08 am PDT
FeedbackOps
CEDAR 7.0 — FOR INTERNAL XEROX USE ONLY
FeedbackOps
Redirecting Print Statements
Eric Bier
© Copyright 1989 Xerox Corporation. All rights reserved.
Abstract: FeedbackOps works together with Feedback.mesa (in Feedback.df) to direct print statements to actual output streams, such as the MessageWindow, a Typescript, a Labels.Label, or an IO.STREAM. By calling the Feedback interface, applications send character strings to a lightweight data structure called a MsgRouter. FeedbackOps tells a given MsgRouter where to send its output. This allows application programmers to direct message strings to a new output region late in the design of an application, without having to modifying the many code locations that send message strings.
Created by: Eric Bier
Maintained by: Eric <Bier>
Keywords: Feedback, MsgRouter, router, typescript, MessageWindow, print statements
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
1. Using FeedbackOps
Getting Started
To build a message router that writes to the MessageWindow, call Feedback.CreateRouter[], and then call FeedbackOps.SetMessageWindow[router] on the result. All messages sent to your router should now go to the MessageWindow.
To send all messages to a typescript as well, call FeedbackOps.CreateNamedTypescript[... typescriptName: $YourTypescriptName ...] to create a typescript and give it a name. Then call SetTypescript[router, $YourTypescriptName]. All messages sent to your router should now go to this typescript.
Read FeedbackOps.mesa to see how to get some messages to go to one place and some to another. Note that you can get messages to go to a typescript and a MessageWindow or Labels.Label.
To get really fancy, you can use Feedback.SetHandler to completely customize the output of your MsgRouter.