CDDynamicObsCommands.mesa (part of ChipNDale)
Copyright © 1985 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, June 5, 1985 8:02:35 pm PDT
Last edited by: Christian Jacobi, August 25, 1986 12:25:37 pm PDT
DIRECTORY
CD, Rope, CDGenerate, CDGenerateBackdoor, CDDynamicObs, CDCommandOpsExtras2, CDMenuSpecials, CDSequencer, CDValue, CDPanel, CDProperties, TerminalIO;
CDDynamicObsCommands: CEDAR PROGRAM
IMPORTS CDDynamicObs, CDGenerateBackdoor, CDCommandOpsExtras2, CDMenuSpecials, CDSequencer, CDValue, CDPanel, CDProperties, TerminalIO, Rope =
BEGIN
DynamicGeneratorsComm: PROC [comm: CDSequencer.Command] =
BEGIN
key: Rope.ROPE;
design: CD.Design ← comm.design;
key ← CDMenuSpecials.SelectOneOf[CDGenerateBackdoor.publicTables, "dynamicize generator"];
IF Rope.IsEmpty[key] THEN TerminalIO.WriteRope["not done\n"]
ELSE {
key ← CDDynamicObs.GetTable[key].name;
TerminalIO.WriteRopes["created (and now uses) [", key, "]\n"];
CDProperties.PutDesignProp[design, $GeneratorProc, key];
CDValue.Store[design, $GeneratorProc, key];
CDPanel.RedisplayLabels[design];
}
END;
CDSequencer.ImplementCommand[$DynamicGenerators, DynamicGeneratorsComm];
CDCommandOpsExtras2.RegisterWithMenu[menu: $GeneratorMenu, entry: "create dynamic generator", doc: "crazy object class", key: $DynamicGenerators, proc: DynamicGeneratorsComm];
END.