it: AdobeOps.EnumFIO => {
numSubMenus, saveKey, currentEnum: CARD ¬ 0;
thisField.type ¬ enumerated;
thisField.dependentsSequence ¬ NEW[AdobeCommon.DependentsSequenceRec[5]];
IF it.field #
LAST[
CARD16]
THEN {
currentSubMenu: CARD ¬ 0;
thisField.dependentOn ¬ handle.fieldViewer.buttons[it.field];
numSubMenus ¬ AdobeTool.CountRopes[thisField.dependentOn.allSelections[0].ropes];
AdobeTool.BumpNumOfDeps[handle.fieldViewer.buttons[field], handle.fieldViewer.buttons[it.field]];
thisField.currentMenu ¬ numSubMenus - 1;
thisField.allSelections ¬ NEW[AdobeCommon.SelectionsSequence[numSubMenus]];
WITH thisSH.fieldList[it.field]
SELECT
FROM
dep: AdobeOps.EnumFIO => {
--tmp-- itkd, depit, foo: CARD;
did: BOOL ¬ FALSE;
-- tmp -- max: CARD ¬ dep.possibilities[0].enumRecs.length;
FOR index:
CARD
IN [0..dep.possibilities[0].enumRecs.length)
DO
did ¬ FALSE;
FOR itIndex:
CARD
IN [0..it.possibilities.length)
DO
-- tmp -- itkd ¬ it.possibilities[itIndex].keyedDependency;
-- tmp -- depit ¬ dep.possibilities[0].enumRecs[index].item;
IF it.possibilities[itIndex].keyedDependency =
dep.possibilities[0].enumRecs[index].item
THEN {
thisField.allSelections[currentSubMenu].num ¬ index;
-- tmp -- foo ¬ it.possibilities[itIndex].enumRecs.length;
FOR i:
CARD
IN [0..it.possibilities[itIndex].enumRecs.length)
DO
thisField.allSelections[currentSubMenu].ropes ¬
CONS[it.possibilities[itIndex].enumRecs[it.possibilities[itIndex].enumRecs.length - i - 1].tag, thisField.allSelections[currentSubMenu].ropes];
ENDLOOP;
currentSubMenu ¬ currentSubMenu + 1;
did ¬ TRUE;
EXIT
};
ENDLOOP;
IF ~did
THEN {
thisField.allSelections[currentSubMenu] ¬ [index, LIST["Nil"]];
currentSubMenu ¬ currentSubMenu + 1;
};
ENDLOOP;
};
ENDCASE => ERROR;
}
ELSE {
thisField.dependentOn ¬ NIL;
thisField.currentMenu ¬ 0;
thisField.allSelections ¬ NEW[AdobeCommon.SelectionsSequence[1]];
thisField.allSelections[0].num ¬ it.possibilities[0].enumRecs[0].item;
FOR index:
CARD
IN [0..it.possibilities[0].enumRecs.length)
DO
thisField.allSelections[0].ropes ¬
CONS[
it.possibilities[0].enumRecs[it.possibilities[0].enumRecs.length - index - 1].tag, thisField.allSelections[0].ropes];
ENDLOOP;
thisField.currentSelection ¬ it.possibilities[0].enumRecs.length - 1;
};
thisField.button ¬ handle.makeButton[
parent: thisViewer,
x: 0,
y: lineIndex * fieldHeight,
name: Rope.Concat[it.name, ": "],
data: procData,
scrollable: FALSE,
proc: $CurrentButtonProc,
cData: procData];
[x, y, w, h] ¬ handle.getBoxGeometry[thisField.button];
thisField.controllerOf ¬ handle.newFieldBox[
parent: thisViewer,
x: w+5,
y: lineIndex * fieldHeight,
w: 400,
h: h,
border: FALSE,
scrollable: FALSE
];
handle.setContents[thisField.controllerOf, "{}"];
IF it.defaultInfo[submit].default #
NIL
THEN {
handle.inhibitEdits[thisField.controllerOf];
handle.setContents[thisField.controllerOf, Rope.Cat["{", it.defaultInfo[submit].default, "}"]];
thisField.boolVal ¬ TRUE;
};
};
it: AdobeOps.ArFIO => {
handle.fieldViewer.buttons[field].type ¬ arId;
handle.fieldViewer.buttons[field].button ¬ handle.makeButton[
parent: thisViewer,
x: 0,
y: lineIndex * fieldHeight,
name: Rope.Concat[it.name, ": "],
data: procData,
scrollable: FALSE,
proc: $SubmitFieldButtonProc,
cData: procData];
[x, y, w, h] ¬ handle.getBoxGeometry[handle.fieldViewer.buttons[field].button];
handle.fieldViewer.buttons[field].controllerOf ¬ handle.newFieldBox[
parent: thisViewer,
x: w+5,
y: lineIndex * fieldHeight,
w: 400,
h: h,
border: FALSE,
scrollable: FALSE
];
handle.inhibitEdits[thisField.controllerOf];
thisField.boolVal ¬ TRUE;
};
it: AdobeOps.DateFIO => {
handle.fieldViewer.buttons[field].type ¬ dateTime;
handle.fieldViewer.buttons[field].button ¬ handle.makeButton[
parent: thisViewer,
x: 0,
y: lineIndex * fieldHeight,
name: Rope.Concat[it.name, ": "],
data: procData,
scrollable: FALSE,
proc: $SubmitFieldButtonProc,
cData: procData];
[x, y, w, h] ¬ handle.getBoxGeometry[handle.fieldViewer.buttons[field].button];
handle.fieldViewer.buttons[field].controllerOf ¬ handle.newFieldBox[
parent: thisViewer,
x: w+5,
y: lineIndex * fieldHeight,
w: 400,
h: h,
border: FALSE,
scrollable: FALSE
];
IF it.defaultInfo[submit].default #
NIL
THEN {
handle.inhibitEdits[thisField.controllerOf];
IF Rope.Equal[it.defaultInfo[submit].default, "CurrentTOD",
FALSE]
THEN
handle.setContents[thisField.controllerOf, AdobeCommon.AdobeTimeRope[BasicTime.Now[]]]
ELSE
handle.setContents[thisField.controllerOf, it.defaultInfo[submit].default];
thisField.boolVal ¬ TRUE;
};
};
it: AdobeOps.NumFIO => {
handle.fieldViewer.buttons[field].type ¬ numeric;
handle.fieldViewer.buttons[field].button ¬ handle.makeButton[
parent: thisViewer,
x: 0,
y: lineIndex * fieldHeight,
name: Rope.Concat[it.name, ": "],
data: procData,
scrollable: FALSE,
proc: $SubmitFieldButtonProc,
cData: procData];
[x, y, w, h] ¬ handle.getBoxGeometry[handle.fieldViewer.buttons[field].button];
handle.fieldViewer.buttons[field].controllerOf ¬ handle.newFieldBox[
parent: thisViewer,
x: w+5,
y: lineIndex * fieldHeight,
w: 400,
h: h,
border: FALSE,
scrollable: FALSE
];
IF it.defaultInfo[submit].default #
NIL
THEN {
handle.inhibitEdits[thisField.controllerOf];
handle.setContents[thisField.controllerOf, it.defaultInfo[submit].default];
thisField.boolVal ¬ TRUE;
};
};
it: AdobeOps.FixFIO => {
handle.fieldViewer.buttons[field].type ¬ fixedLengthString;
handle.fieldViewer.buttons[field].button ¬ handle.makeButton[
parent: thisViewer,
x: 0,
y: lineIndex * fieldHeight,
name: Rope.Concat[it.name, ": "],
data: procData,
scrollable: FALSE,
proc: $SubmitFieldButtonProc,
cData: procData];
[x, y, w, h] ¬ handle.getBoxGeometry[handle.fieldViewer.buttons[field].button];
handle.fieldViewer.buttons[field].controllerOf ¬ handle.newFieldBox[
parent: thisViewer,
x: w+5,
y: lineIndex * fieldHeight,
w: handle.getBoxGeometry[handle.outer].w - w - 5,
h: h,
border: FALSE,
scrollable: TRUE
];
thisField.maxLength ¬ it.maxLength;
handle.xBoundBox[handle.fieldViewer.outer, handle.fieldViewer.buttons[field].controllerOf];
IF it.defaultInfo[submit].default #
NIL
THEN {
logName: Rope.ROPE ¬ NIL;
handle.inhibitEdits[thisField.controllerOf];
IF Rope.Equal[it.defaultInfo[submit].default, "LoginName",
FALSE]
THEN {
ENABLE AdobeCommon.NoCredentials => {
AdobeCommon.PostMessage[handle, TRUE, "You must xnslogin."];
logName ¬ "Login!";
CONTINUE
};
c: CARD;
logName ¬ AdobeCommon.GetFullLoginName[];
c ¬ logName.Length[];
IF c > it.maxLength
THEN
logName ¬ Rope.Substr[logName, 0, it.maxLength];
handle.setContents[thisField.controllerOf, logName];
}
ELSE
handle.setContents[thisField.controllerOf, it.defaultInfo[submit].default];
thisField.boolVal ¬ TRUE;
};
};
it: AdobeOps.StrFIO => {
thisField.type ¬ string;
thisField.button ¬ handle.makeButton[
parent: thisViewer,
x: 0,
y: lineIndex * fieldHeight,
name: Rope.Concat[it.name, ": "],
data: procData,
scrollable: FALSE,
proc: $SubmitFieldButtonProc,
cData: procData];
[x, y, w, h] ¬ handle.getBoxGeometry[thisField.button];
thisField.adjButton ¬ handle.makeButton[
parent: thisViewer,
x: x + w - --VFonts.StringWidth["<Adj>"]-- 35 -5,
y: (lineIndex+1) * fieldHeight,
name: "<Adj>",
data: procData.e,
scrollable: TRUE,
proc: $AdjustStringHeight,
cData: procData];
thisField.controllerOf ¬ handle.newFieldBox[
parent: thisViewer,
x: w+5,
y: lineIndex * fieldHeight,
w: handle.getBoxGeometry[handle.outer].w - w - 5,
h: (h * handle.unboundFieldHeight) - 2,
border: FALSE,
scrollable: TRUE
];
handle.xBoundBox[handle.fieldViewer.outer, thisField.controllerOf];
thisField.currentHeight ¬ handle.unboundFieldHeight;
thisField.stream ← ViewerIO.CreateViewerStreams[
name: Rope.Concat[it.name, ".stream"],
viewer: thisField.controllerOf,
editedStream: FALSE
].out;
lineIndex ¬ lineIndex + thisField.currentHeight - 1;
IF it.defaultInfo[submit].default #
NIL
THEN {
handle.inhibitEdits[thisField.controllerOf];
handle.setContents[thisField.controllerOf, it.defaultInfo[submit].default];
thisField.boolVal ¬ TRUE;
};
};