<<>> <> <> <> <> <> <> <> <> <> <> DIRECTORY AccessCH USING [NSNameFromRope], AdobeCommon, AdobeCommonInternal USING [EntryBytes, InstanceData, InstanceDataHandle], AdobeOps USING [ARSystemHandle, ARNumber, FieldItemHandle, FieldItemObject, FieldItemObjectRec, FieldList, FieldListArray, nilARNumber, QueryList, UserSpecifiedOrder, ArFIO, DateFIO, EnumFIO, FixFIO, NumFIO, StrFIO], AdobeTool, AdobeToolContext, AdobeServer, ARAccess USING [AppendChar, ARHandle, ARStorage, Error, ExamineAR, FreeAR, GetAR], Ascii USING [CR, NUL, LF, SP, TAB], BasicTime USING [Now, Unpacked], Convert USING [Error, RopeFromCard, RopeFromChar, RopeFromTime, UnpackedTimeFromRope], CrRPC USING [BulkDataXferProc], IO, PFS USING [Close, Delete, Error, Open, OpenFile, PathFromRope, StreamOpen], Rope, XNSAdobeClientOps USING [GetAcceleratorInfo]; AdobeToolImplE: CEDAR MONITOR IMPORTS AccessCH, AdobeCommon, AdobeToolContext, ARAccess, BasicTime, Convert, IO, PFS, Rope, XNSAdobeClientOps EXPORTS AdobeTool = BEGIN <> reportPos: CARDINAL = 0; formatPos: CARDINAL = 1; overwritePos: CARDINAL = 2; resetPos: CARDINAL = 3; setFieldsPos: CARDINAL = 4; rptBkgdPos: CARDINAL = 5; outFilePos: CARDINAL = 6; tmpltFilePos: CARDINAL = 7; rptQlNamePos: CARDINAL = 8; nReportParams: CARDINAL = 9; templateProblem: ERROR = CODE; <> <> <> <> <> <> <> <> <> <> <> <> <>> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <<"plain", AdobeCommon.FormatType.plain];>> <> <<"columns", AdobeCommon.FormatType.columns];>> <> <<"template", AdobeCommon.FormatType.template];>> <> < {>> <> <> <> <> <> <> <> <> <<--proc: ??,-- value: @reportToolData.format,>> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> < ERROR; --shouldn't happen>> <> SetUpReportTool: PUBLIC PROCEDURE [handle: AdobeCommon.Handle] ~ { instanceData: AdobeCommonInternal.InstanceDataHandle ¬ NARROW[handle.instanceData]; col: {left, right} ¬ left; row: CARD ¬ 0; buttonHeight: CARDINAL ¬ 14; middle: CARD ¬ handle.getBoxGeometry[handle.fieldViewer.outer].w/2; fl: AdobeOps.FieldList ¬ handle.systemHandle.fieldList; bs: AdobeCommon.ButtonsSeq; handle.fieldViewer.buttons ¬ NEW[AdobeCommon.ButtonSeqObject[fl.length+1]]; WITH instanceData SELECT FROM id: REF AdobeCommonInternal.InstanceData.report => { id.fieldsInReport ¬ NEW[AdobeCommon.ReportFieldsSeq[fl.length]]; FOR i: CARD IN [0..id.fieldsInReport.length) DO id.fieldsInReport[i] ¬ FALSE; ENDLOOP; }; ENDCASE; bs ¬ handle.fieldViewer.buttons; bs[fl.length] ¬ NEW[AdobeCommon.EnumeratedTypesRec]; bs[fl.length].button ¬ handle.newLabelBox[ parent: handle.fieldViewer.outer, x: middle - --VFonts.StringWidth["Fields in the Report"]--200 / 2, y: row*(buttonHeight+1), name: "Fields in the Report" ]; <> <> <> <> row ¬ row + 1; FOR i: CARDINAL IN [0..fl.length) DO bs[i] ¬ NEW[AdobeCommon.EnumeratedTypesRec]; bs[i].mainViewer ¬ handle; bs[i].fieldNum ¬ i; bs[i].button ¬ handle.makeButton[ parent: handle.fieldViewer.outer, x: IF (col = left) THEN 0 ELSE middle, y: row*(buttonHeight+1), name: fl[i].name, --border: FALSE, --data: handle.fieldViewer.buttons[i], proc: $CheckField, cData: handle.fieldViewer.buttons[i]]; SELECT col FROM left => col ¬ right; right => { col ¬ left; row ¬ row + 1; }; ENDCASE; ENDLOOP; }; <> <> <> <> <> <> < {>> <> <> <> <> <> <> <> <> <> <> <> <> <> <> backStr: Rope.ROPE ¬ NIL; <> <> <> <> ReportCommandProc: PUBLIC PROCEDURE [h: AdobeCommon.Handle] = { <> <> <> <> windowData: AdobeCommon.Handle ¬ h; <> IF windowData.system = LAST[CARDINAL] --OR windowData.context = NIL --OR windowData.knownSystems = NIL OR windowData.knownSystems.next = 0 THEN { AdobeCommon.PostMessage[windowData, TRUE, "No available systems"]; RETURN}; IF windowData.isBusy THEN AdobeCommon.PostMessage[windowData, TRUE, "Adobe system is Busy. Please try again later. "] ELSE { windowData.isBusy ¬ TRUE; <> <> <> <> <> <> AdobeCommon.CatchErrors[ --sw, item, index, --windowData, ChooseReportCmd]}--}; }; ChooseReportCmd: PROC[windowData: AdobeCommon.Handle] = { <> { ENABLE UNWIND => windowData.isBusy ¬ FALSE; <