(FILECREATED "24-Nov-86 16:35:56" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH166.;1 3434 changes to: (VARS RHTPATCH166COMS)) (* Copyright (c) 1986 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT RHTPATCH166COMS) (RPAQQ RHTPATCH166COMS ((* * Fixes bug #314: filing in closed box allows duplicates.) (* * Change to NCCARDS) (FNS NC.AddParents) (* * Change to NCUTILITIES) (MACROS NC.ActivateCardAndDo))) (* * Fixes bug #314: filing in closed box allows duplicates.) (* * Change to NCCARDS) (DEFINEQ (NC.AddParents (LAMBDA (WindowOrTextStream) (* rht: "24-Nov-86 16:31") (* Add a subtopic link from a contents card specified by the user to the contents card specified by WindowOrTextStream. But first check to make sure that this would not introduce any circularities in the contents lattice.) (* * rht 12/8/84: Massive shaving. Now calls NC.MakeChildLink to do the tough work.) (* * rht 10/3/85: No longer prints final, annoying, slow-to-disappear message in prompt window if nothing selected.) (* * fgh 11/13/85 Updated to handle Card object.) (* * fgh 6/9/86 Added code to check to make sure that another operation is not in progress on this card when this fn is called.) (* * rht 7/5/86: Now checks for readonly cards.) (* * rht&pmi 11/24/86: Surrounded call to NC.MakeChildLink with NC.ActivateCardAndDo so that ParentCard will be active for duration of the call.) (LET (Card NewParents (Window (WINDOW.FROM.TEDIT.THING WindowOrTextStream)) OperationInProgress) (SETQ Card (NC.CoerceToCard Window)) (if (NC.CheckForNotReadOnly Card Window "Can't do filing in ") then (if (SETQ OperationInProgress (NC.OperationInProgress Card)) then (* * Another interaction operation is in progress on this card and we have to interact with the user. Can't do.) (NC.PrintOperationInProgressMsg Window "Designate FileBoxes" OperationInProgress) else (NC.ProtectedCardOperation Card Designate% FileBoxes (SETQ NewParents (NC.SelectNoteCards NIL (FUNCTION NC.FileBoxP) NC.SelectingParentsMenu Card NIL " Please select the new parent FileBox(es).")) (AND NewParents Card (for ParentCard in NewParents bind OneHook when (NC.ActivateCardAndDo ParentCard (NC.MakeChildLink Card ParentCard Window)) do (SETQ OneHook T) finally (RETURN OneHook))))))))) ) (* * Change to NCUTILITIES) (DECLARE: EVAL@COMPILE (DEFMACRO NC.ActivateCardAndDo (Card &REST Forms) (* * rht 10/15/86: This written by MarkM. I changed slightly so as to accept a list of Forms rather than a singleton.) (* * rht&pmi 11/24: Changed name of localvar.) (BQUOTE (LET (($$ActiveFlg$$ (NC.ActiveCardP , Card))) (OR $$ActiveFlg$$ (NC.GetNoteCard , Card)) (PROG1 (PROGN ,@ Forms) (OR $$ActiveFlg$$ (NC.DeactivateCard , Card)))))) ) (PUTPROPS RHTPATCH166 COPYRIGHT ("Xerox Corporation" 1986)) (DECLARE: DONTCOPY (FILEMAP (NIL (547 2861 (NC.AddParents 557 . 2859))))) STOP