CDCellCommands.mesa (part of ChipNDale)
Copyright © 1983, 1986 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, July 11, 1983 3:42 pm
Last Edited by: Christian Jacobi, August 6, 1986 11:00:06 am PDT
DIRECTORY
Ascii,
CD,
CDBasics,
CDCells,
CDCellsInteractions,
CDCommandOps,
CDCommandOpsExtras,
CDDirectory,
CDDirectoryOps,
CDInstances,
CDMarks,
CDOps,
CDPanel,
CDPanelExtras,
CDProperties,
CDSequencer,
CDValue,
IO,
Real,
Rope,
RopeList,
TerminalIO,
UserProfile,
ViewerClasses,
ViewerOps,
ViewerTools;
CDCellCommands: CEDAR PROGRAM
IMPORTS Ascii, CD, CDOps, CDCells, CDCellsInteractions, CDCommandOps, CDCommandOpsExtras, CDDirectory, CDDirectoryOps, CDInstances, CDMarks, CDPanel, CDPanelExtras, CDProperties, CDSequencer, CDValue, IO, Real, Rope, RopeList, TerminalIO, UserProfile, ViewerOps, ViewerTools =
BEGIN
interactiveKey: Rope.ROPE ~ "← interactive";
GetName: PROC [design: CD.Design, prompt: Rope.ROPE] RETURNS [name: Rope.ROPE] = {
name ← CDPanelExtras.FromDisplayRope[design, $ObjectName];
IF Rope.IsEmpty[name] OR Rope.Equal[name, interactiveKey, FALSE] THEN
name ← TerminalIO.RequestRope[prompt];
};
DrawObjectByNameComm: PROC [comm: CDSequencer.Command] =
BEGIN
name: Rope.ROPE; ob: CD.Object;
TerminalIO.WriteRope["draw object; "];
name ← GetName[comm.design, "type name>\n"];
ob ← CDDirectory.Fetch[comm.design, name].object;
IF ob=NIL THEN TerminalIO.WriteRopes[name, " not found\n"]
ELSE {
CDOps.IncludeObjectI[comm.design, ob, comm.pos];
TerminalIO.WriteRopes[name, " inserted\n"];
};
END;
RemoveObFromDirComm: PROC [comm: CDSequencer.Command] =
BEGIN
name, msg: Rope.ROPENIL; done: BOOLFALSE; ob: CD.Object;
TerminalIO.WriteRope["remove object from directory; "];
name ← GetName[comm.design, "type name>\n"];
ob ← CDDirectory.Fetch[comm.design, name].object;
IF ob=NIL THEN TerminalIO.WriteRopes[name, " not found\n"]
ELSE {
IF TerminalIO.Confirm[Rope.Cat["remove ", name]] THEN {
[done, msg] ← CDDirectoryOps.RemoveIfUnused[comm.design, ob];
TerminalIO.WriteRope[msg];
};
IF ~done THEN TerminalIO.WriteRope[" not "];
TerminalIO.WriteRope["done\n"];
};
END;
DisplayCellNames: PROC [comm: CDSequencer.Command] =
BEGIN
EachEntry: CDDirectory.EachEntryAction
--[name: Rope.ROPE, ob: CD.Object] RETURNS [quit: BOOL] -- =
BEGIN quit ← FALSE;
count ← count+1;
IF comm.key=$RestricedDisplayCellNames THEN {
IF Rope.Length[name]<=0 THEN RETURN
ELSE {
ch: CHAR = Rope.Fetch[name];
IF ~Ascii.Letter[ch] AND ~Ascii.Digit[ch] THEN RETURN
}
};
displayed ← displayed+1;
WITH ob.specificRef SELECT FROM
cp: CD.CellPtr => list ← CONS[cp.name, list];
ENDCASE => list ← CONS[Rope.Cat[name, " [", CDOps.ObjectInfo[ob], "]"], list];
END;
trailer, contents: Rope.ROPE ← NIL;
list: LIST OF Rope.ROPE NIL; count: INT ← 0; displayed: INT ← 0;
name: Rope.ROPEIF comm.design.name#NIL THEN comm.design.name ELSE "design ""no name""";
header: Rope.ROPE ← Rope.Cat["Directory of ", name];
TerminalIO.WriteRope["open directory viewer\n"];
[] ← CDDirectory.Enumerate[comm.design, EachEntry];
list ← RopeList.Sort[list, RopeList.Compare];
FOR l: LIST OF Rope.ROPE ← list, l.rest WHILE l#NIL DO
contents ← Rope.Cat[contents, " ", l.first, "\n"];
ENDLOOP;
trailer ← IO.PutFR["%g objects counted ", IO.int[count]];
IF count#displayed THEN
trailer ← IO.PutFR["%g %g displayed", IO.rope[trailer], IO.int[displayed]];
trailer ← Rope.Cat[trailer, "\n"];
TerminalIO.WriteRopes[" ", trailer];
ViewerOps.OpenIcon[ViewerTools.MakeNewTextViewer[info: [
name: header,
data: Rope.Cat[header, "\n", contents, trailer]
]]];
END;
CreateCellAndName: PROC [comm: CDSequencer.Command] =
BEGIN
TerminalIO.WriteRope["create cell "];
IF ~CDCellsInteractions.CreateCellSelected[comm.design].done THEN
TerminalIO.WriteRope[" not done\n"];
END;
CreateCellDefaultName: PROC [comm: CDSequencer.Command] =
BEGIN
TerminalIO.WriteRope["create cell without name\n"];
IF ~CDCellsInteractions.CreateCellSelected[comm.design, "-no name-"].done THEN
TerminalIO.WriteRope[" not done\n"];
END;
PushIntoCellS: PROC [comm: CDSequencer.Command] =
BEGIN
inst: CD.Instance ← CDCommandOps.TheInstance[comm: comm, text: "Push into "];
IF inst#NIL THEN {
TerminalIO.WriteRope[CDOps.ObjectInfo[inst.ob]];
IF ~CDCells.IsCell[inst.ob] THEN {
TerminalIO.WriteRope[" **is not cell; object expanded**"];
IF ~ inst.ob.class.inDirectory THEN CDSequencer.Quit[" not done"];
};
TerminalIO.WriteLn[];
IF CDCellsInteractions.PushInCellInstance[comm.design, inst, TRUE] THEN TerminalIO.WriteRope["done\n"]
ELSE TerminalIO.WriteRope["not done\n"];
};
END;
PushIntoCellSIconic: PROC [comm: CDSequencer.Command] =
BEGIN
done: BOOL;
name: Rope.ROPENIL;
inst: CD.Instance ← CDCommandOps.TheInstance[comm: comm, text: "Push into representant "];
IF inst#NIL THEN {
TerminalIO.WriteRopes[CDOps.ObjectInfo[inst.ob], "\n"];
WITH CDProperties.GetProp[inst.ob, $IconFor] SELECT FROM
r: Rope.ROPE => name ← r;
ENDCASE => NULL;
IF name=NIL THEN
WITH CDProperties.GetProp[inst, $IconFor] SELECT FROM
r: Rope.ROPE => name ← r;
ENDCASE => NULL;
IF Rope.IsEmpty[name] THEN TerminalIO.WriteRope[" no iconic property; not done\n"]
ELSE {
TerminalIO.WriteRopes[" pushing into ", name, "\n"];
done ← PushByName[comm.design, name, comm];
IF done THEN TerminalIO.WriteRope["done\n"] ELSE TerminalIO.WriteRope["failed\n"];
};
};
END;
ExpandComm: PROC [comm: CDSequencer.Command] =
BEGIN
others: CD.InstanceList ← NIL; cnt: INT ← 0; someOb: CD.Object ← NIL;
ExpandInclude: PROC [inst: CD.Instance, ob: CD.Object] = {
--replace the instance by an instance of the expanded object ob
--and include the instance into "others"
cp: CD.CellPtr ← NARROW[ob.specificRef];
include: CD.InstanceList ← CDInstances.ComposedList[cp.contents, inst.location, inst.ob.size, inst.orientation];
FOR il: CD.InstanceList ← include, il.rest WHILE il#NIL DO
il.first.selected ← TRUE;
others ← CONS[il.first, others];
ENDLOOP;
someOb ← inst.ob;
cnt ← cnt+1;
CDOps.DelayedRedraw[comm.design, CDInstances.InstRectO[inst]];
};
Dont: PROC [inst: CD.Instance, msg: Rope.ROPE] = {
others ← CONS[inst, others];
inst.selected ← FALSE;
CDOps.DelayedRedraw[comm.design, CDInstances.InstRectO[inst]];
TerminalIO.WriteRopes[CDOps.ObjectInfo[inst.ob], " "];
TerminalIO.WriteRopes[msg, "; deselected\n"];
};
selected: CD.InstanceList ← NIL;
TerminalIO.WriteRope["expand\n"];
[selected, others] ← CDInstances.SplitSelected[CDOps.InstList[comm.design]];
FOR il: CD.InstanceList ← selected, il.rest WHILE il#NIL DO
IF ~il.first.ob.class.inDirectory THEN Dont[il.first, "atomic, can not be expanded"]
ELSE {
ob: CD.Object ← il.first.ob;
WHILE ob#NIL AND ~CDCells.IsCell[ob] DO
ob ← CDDirectory.ExpandComplete[ob, comm.design, comm.design];
IF ob=il.first.ob THEN ob ← NIL; --to exit loop
IF ob#NIL AND CDCells.IsCell[ob] THEN {
TerminalIO.WriteRopes[CDOps.ObjectInfo[il.first.ob], " converted to cell\n"];
[] ← CDDirectoryOps.RemoveIfUnused[comm.design, ob];
}
ENDLOOP;
IF ob#NIL AND CDCells.IsCell[ob] THEN ExpandInclude[il.first, ob]
ELSE Dont[il.first, "can not be converted to cell to expand"]
}
ENDLOOP;
IF cnt>0 THEN CDOps.SetInstList[comm.design, others];
IF cnt=1 AND someOb#NIL THEN TerminalIO.WriteRopes[CDOps.ObjectInfo[someOb], " expanded"]
ELSE TerminalIO.WriteF1["%g objects expanded\n", IO.int[cnt]];
END;
PopFromCellMenu: PROC [comm: CDSequencer.Command] =
BEGIN
TerminalIO.WriteRope["pop\n"];
IF ~CDCellsInteractions.PopFromCell[comm.design, interactive] THEN
TerminalIO.WriteRope[" not done\n"];
END;
PopFromCellFlush: PROC [comm: CDSequencer.Command] =
BEGIN
TerminalIO.WriteRope["pop and flush\n"];
IF ~CDCellsInteractions.PopFromCell[comm.design, flush] THEN
TerminalIO.WriteRope[" not done\n"];
END;
PopFromCellReplace: PROC [comm: CDSequencer.Command] =
BEGIN
TerminalIO.WriteRope["pop and replace\n"];
IF ~CDCellsInteractions.PopFromCell[comm.design, replace] THEN
TerminalIO.WriteRope[" not done\n"];
END;
PopFromCellNew: PROC [comm: CDSequencer.Command] =
BEGIN
TerminalIO.WriteRope["pop and new\n"];
IF ~CDCellsInteractions.PopFromCell[comm.design, newcell] THEN
TerminalIO.WriteRope[" not done\n"];
END;
PruneDirComm: PROC [comm: CDSequencer.Command] =
BEGIN
autoOnly: BOOL ← comm.key#$DeleteUnUsedObjects;
TerminalIO.WriteRope["prune directory\n"];
CDDirectoryOps.PruneDirectory[design: comm.design, autoOnly: autoOnly, askFirst: TRUE];
END;
DrawWithBorder: PROC [comm: CDSequencer.Command] =
BEGIN
TerminalIO.WriteRope["set cells(s) draw mode: draw with border\n"];
FOR l: CD.InstanceList ← CDOps.InstList[comm.design], l.rest WHILE l#NIL DO
IF l.first.selected THEN {
CDCells.SetBorder[l.first.ob, TRUE];
CDOps.RedrawInstance[comm.design, l.first, FALSE];
}
ENDLOOP;
END;
DrawWithoutBorder: PROC [comm: CDSequencer.Command] =
BEGIN
TerminalIO.WriteRope["set cells(s) draw mode: draw without border\n"];
FOR l: CD.InstanceList ← CDOps.InstList[comm.design], l.rest WHILE l#NIL DO
IF l.first.selected THEN {
CDCells.SetBorder[l.first.ob, FALSE];
CDOps.RedrawInstance[comm.design, l.first];
}
ENDLOOP;
END;
SetCellSimplificationComm: PROC [comm: CDSequencer.Command] =
BEGIN
inst: CD.Instance; multiple: BOOL;
TerminalIO.WriteRope["set cell simplification #\n"];
[inst, multiple] ← CDOps.SelectedInstance[comm.design];
IF multiple THEN TerminalIO.WriteRope[" multiple selection; not done\n"]
ELSE IF inst=NIL THEN TerminalIO.WriteRope[" no selection; not done\n"]
ELSE {
TerminalIO.WriteRope[inst.ob.class.describe[inst.ob]];
IF ISTYPE[inst.ob.specificRef, CD.CellPtr] THEN {
cptr: CD.CellPtr ~ NARROW[inst.ob.specificRef];
h: CD.Number ← MAX[1, inst.ob.size.y];
TerminalIO.WriteF[" [currently: simplification if height < %g pixels", [integer[Real.Round[cptr.simplifyOn*h]]]];
cptr.simplifyOn ← MIN[MAX[TerminalIO.RequestInt[" pixels] type > "], 0], LAST[NAT]]/h;
CDOps.RedrawInstance[comm.design, inst];
TerminalIO.WriteRope[" done\n"];
}
ELSE TerminalIO.WriteRope[" not a cell; not done\n"];
}
END;
RenameObjectComm: PROC [comm: CDSequencer.Command] =
BEGIN
desc: Rope.ROPE;
inst: CD.Instance ← CDCommandOps.TheInstance[comm];
IF inst#NIL THEN {
desc ← CDOps.ObjectInfo[inst.ob];
IF ~inst.ob.class.inDirectory THEN
TerminalIO.WriteRopes[" ", desc, " can not have name\n"]
ELSE {
newName: Rope.ROPE ← GetName[comm.design, " new name > "];
IF Rope.IsEmpty[newName] THEN newName ← "-";
IF CDDirectory.Rename[comm.design, inst.ob, newName] THEN
TerminalIO.WriteRope[Rope.Cat[" ", desc, " renamed to ", CDDirectory.Name[inst.ob], "\n"]]
ELSE TerminalIO.WriteRope[" not done\n"]
};
};
END;
ReplaceObjectComm: PROC [comm: CDSequencer.Command] =
BEGIN
newName, oldName: Rope.ROPE; old, new: CD.Object; found: BOOL;
offset: CD.Position ← [0, 0];
lambda: CD.Number ← comm.design.technology.lambda;
TerminalIO.WriteRope["replace object allover in design\n"];
oldName ← TerminalIO.RequestRope[" replace (name) > "];
[found, old] ← CDDirectory.Fetch[comm.design, oldName];
IF ~found THEN {TerminalIO.WriteRopes[" ", oldName, " not found\n"]; RETURN};
newName ← TerminalIO.RequestRope[" by (name) > "];
[found, new] ← CDDirectory.Fetch[comm.design, newName];
IF ~found THEN {TerminalIO.WriteRopes[" ", newName, " not found\n"]; RETURN};
TerminalIO.WriteRope[" do you want to specify an offset?\n"];
SELECT TerminalIO.RequestSelection[label: "offset",
choice: LIST["lambda", "ints", "none"]] FROM
1 => {
offset.x ← TerminalIO.RequestInt[" x in lambda >"]*lambda;
offset.y ← TerminalIO.RequestInt[" y in lambda >"]*lambda;
};
2 => {
offset.x ← TerminalIO.RequestInt[" x in ints >"];
offset.y ← TerminalIO.RequestInt[" y in ints >"];
};
ENDCASE => offset ← [0, 0];
CDDirectory.ReplaceObject[design: comm.design, old: old, new: new, off: offset];
SELECT TerminalIO.RequestSelection[label: "cleanup ?",
choice: LIST["remove replaced ob from dir", "remove replaced ob from dir and rename other", "no"]] FROM
1 => [] ← CDDirectoryOps.RemoveIfUnused[comm.design, old];
2 => CDDirectoryOps.RenameNRemove[comm.design, new, oldName];
ENDCASE => NULL;
TerminalIO.WriteRope[" end replace\n"];
END;
PushNamedComm: PROC [comm: CDSequencer.Command] =
BEGIN
done: BOOL;
name: Rope.ROPE;
TerminalIO.WriteRope["push into cell by name\n"];
WITH comm.data SELECT FROM
r: Rope.ROPE => {
TerminalIO.WriteRopes["push into cell", r, "\n"];
name ← r;
};
ENDCASE => {
TerminalIO.WriteRope["push into cell by name\n"];
name ← GetName[comm.design, " cell name >"];
TerminalIO.WriteRopes[" for: ", name, "\n"];
};
done ← PushByName[comm.design, name, comm];
IF done THEN TerminalIO.WriteRope["done\n"] ELSE TerminalIO.WriteRopes["failed\n"]
END;
--**PushByName ************************
foundAndStop: SIGNAL = CODE;
HandleRec: TYPE = RECORD [
stopFlag: REF BOOL NIL,
iDidIt: BOOLFALSE,
gMark: CDMarks.MarkRange,
cell: CD.Object ← NIL,
drawStack: CD.InstanceList ← NIL
];
MyDrawChild: CD.DrawProc =
BEGIN
IF inst.ob.class.inDirectory THEN {
h: REF HandleRec ← NARROW[pr.devicePrivate];
IF inst.ob=h.cell THEN {
h.drawStack ← CONS[inst, h.drawStack];
h.iDidIt ← TRUE;
SIGNAL foundAndStop
};
WITH inst.ob.specificRef SELECT FROM
cp: CD.CellPtr => {
IF inst.ob.marked#h.gMark THEN {
inst.ob.marked ← h.gMark;
h.drawStack ← CONS[inst, h.drawStack];
inst.ob.class.drawMe[inst: inst, pos: inst.location, orient: inst.orientation, pr: pr];
h.drawStack ← h.drawStack.rest;
};
};
ENDCASE => NULL;
}
END;
PushByName: PROC [design: CD.Design, name: Rope.ROPE, comm: CDSequencer.Command←NIL] RETURNS [done: BOOLFALSE] =
--comm is used to find a viewer used for scale changes...
-- [using the viewer command enables its undo on the scale change]
BEGIN
h: REF HandleRec = NEW[HandleRec←[
stopFlag: NEW[BOOL],
gMark: 0
]];
myDrawRef: CD.DrawRef ← CD.CreateDrawRef[[
design: design,
interestClip: CDBasics.universe,
drawChild: MyDrawChild,
devicePrivate: h
]];
pushStack: CD.InstanceList ← NIL; --will be draw stack in reversed order
MyDrawWithMark: PROC [mark: CDMarks.MarkRange] =
BEGIN
h.gMark ← mark;
--draw only from pushed in cell point in hierarchy
design.actual.first.dummyCell.ob.class.drawMe[inst: design.actual.first.dummyCell, pos: [0, 0], orient: CD.original, pr: myDrawRef ! foundAndStop => CONTINUE];
END;
ReverseInstanceList: PROC [list: CD.InstanceList] RETURNS[val: CD.InstanceList] = {
val ← NIL;
UNTIL list = NIL DO
val ← CONS[list.first, val];
list ← list.rest;
ENDLOOP;
RETURN[val];
};
--set up
h.cell ← CDDirectory.Fetch[design, name].object;
IF h.cell=NIL THEN {
TerminalIO.WriteRopes["design does not have object ", name, "\n"];
RETURN
};
--if we are already pushed in, it would not harm the program,
--but it is checked because it would confuse the designer
FOR pl: LIST OF CD.PushRec ← design.actual, pl.rest WHILE pl#NIL DO
IF pl.first.mightReplace#NIL AND pl.first.mightReplace.ob=h.cell THEN {
TerminalIO.WriteRopes["design is already pushed into", name, "\n"];
RETURN
}
ENDLOOP;
--check if a path to the cell exists, and build the path
BEGIN
markFailed: BOOLFALSE;
TryFromCurrentLevel: PROC [] = {
--check first if it exists in an easy accessible position on top level
FOR il: CD.InstanceList ← CDOps.InstList[design], il.rest WHILE il#NIL DO
IF il.first.ob=h.cell THEN {
h.iDidIt ← TRUE; h.drawStack ← LIST[il.first]; EXIT
};
ENDLOOP;
--now try really hard
IF ~ h.iDidIt THEN
CDMarks.DoWithMark[design, MyDrawWithMark
! CDMarks.MarkOccupied => {markFailed ← TRUE; CONTINUE}
];
};
TryFromCurrentLevel[];
WHILE ~h.iDidIt AND ~markFailed AND CDCells.IsPushedIn[design] DO
TerminalIO.WriteRope["not found in accessible position\n try to pop\n"];
IF ~CDCellsInteractions.PopFromCell[design, interactive] THEN {
TerminalIO.WriteRope["failed: user did not allow pop out\n"];
RETURN
};
TryFromCurrentLevel[];
ENDLOOP;
IF markFailed THEN {
TerminalIO.WriteRope["**inconsistent use of mark\n"];
RETURN
};
IF ~h.iDidIt THEN {
h.drawStack ← LIST[CDCommandOpsExtras.PlaceInst[design, h.cell, comm]];
TerminalIO.WriteRopes["**object ", CDDirectory.Name[h.cell], " drawn**\n"];
};
END;
--there is a path
--make pushStack in push order; (reverse order as drawStack)
pushStack ← ReverseInstanceList[h.drawStack]; --Don't trust that silly List module;
--do the pushes
WHILE pushStack#NIL DO
--select exclusively the application we want to push in
--pushing in makes a copy of the application list! check for the right object
inst: CD.Instance ← NIL;
CDSequencer.CheckAborted[design];
FOR il: CD.InstanceList ← CDOps.InstList[design], il.rest WHILE il#NIL DO
IF il.first.ob=pushStack.first.ob THEN {
inst ← il.first;
EXIT
};
REPEAT FINISHED => {
TerminalIO.WriteRope["finding cell failed\n"];
RETURN
}
ENDLOOP;
IF ~CDCellsInteractions.PushInCellInstance[design, inst] THEN {
TerminalIO.WriteRope["push failed\n"];
IF comm#NIL THEN
CDSequencer.ExecuteCommand[$ResetScaleTop, design, dontQueue, comm];
RETURN
};
pushStack ← pushStack.rest
ENDLOOP;
--we are successully pushed in
done ← TRUE;
--position the viewer
IF comm#NIL THEN
CDSequencer.ExecuteCommand[$ResetScaleTop, design, dontQueue, comm];
--help the garbage collector
h.drawStack ← NIL; myDrawRef.viewerPrivate ← NIL; myDrawRef ← NIL; pushStack ← NIL;
END;
CDSequencer.ImplementCommand[$PopMenu, PopFromCellMenu,, doQueue];
CDSequencer.ImplementCommand[$PopNew, PopFromCellNew,, doQueue];
CDSequencer.ImplementCommand[$PopFlush, PopFromCellFlush,, doQueue];
CDSequencer.ImplementCommand[$PopReplace, PopFromCellReplace,, doQueue];
CDSequencer.ImplementCommand[$PushS, PushIntoCellS,, doQueue];
CDSequencer.ImplementCommand[$PushSIconic, PushIntoCellSIconic,, doQueue];
CDSequencer.ImplementCommand[$ExpandS, ExpandComm];
CDSequencer.ImplementCommand[$CreateCellSAndName, CreateCellAndName];
CDSequencer.ImplementCommand[$CreateCellSUnNamed, CreateCellDefaultName];
CDSequencer.ImplementCommand[$DisplayCellNames, DisplayCellNames,, doQueue];
CDSequencer.ImplementCommand[$RestricedDisplayCellNames, DisplayCellNames,, doQueue];
CDSequencer.ImplementCommand[$DrawCell, DrawObjectByNameComm];
CDSequencer.ImplementCommand[$RemoveCell, RemoveObFromDirComm,, doQueue];
CDSequencer.ImplementCommand[$DeleteUnUsedObjects, PruneDirComm,, doQueue];
CDSequencer.ImplementCommand[$DeleteUnUsedAutoObs, PruneDirComm,, doQueue];
CDSequencer.ImplementCommand[$CellSimplification, SetCellSimplificationComm,, doQueue];
CDSequencer.ImplementCommand[$RenameS, RenameObjectComm,, doQueue];
CDSequencer.ImplementCommand[$Replace, ReplaceObjectComm];
CDSequencer.ImplementCommand[$DrawWithoutBorder, DrawWithoutBorder];
CDSequencer.ImplementCommand[$DrawWithBorder, DrawWithBorder];
CDSequencer.ImplementCommand[$PushNamed, PushNamedComm,, doQueue];
CDValue.RegisterKey[$ObjectName, NIL, $chj];
CDValue.Store[NIL, $ObjectName, interactiveKey];
IF UserProfile.Boolean["ChipNDale.ObjectPrefix", FALSE] THEN {
CDPanelExtras.DefineTextEntry[cdValueKey: $ObjectName, button: "object name:"];
CDPanel.DefineNewLine[];
};
END.