(FILECREATED "29-Jan-87 12:20:25" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH188.;3 7009 changes to: (VARS RHTPATCH188COMS) (FNS NC.FileBoxCollectChildren NC.AddParents) previous date: "28-Jan-87 20:24:01" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH188.;1) (* Copyright (c) 1987 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT RHTPATCH188COMS) (RPAQQ RHTPATCH188COMS ((* * Fixes bug reported by John Tang whereby cards filed in boxes not up on the screen were only "half" linked.) (* * Changes to NCFILEBOXCARD) (FNS NC.FileBoxCollectChildren) (* * Changes to NCCARDS) (FNS NC.AddParents))) (* * Fixes bug reported by John Tang whereby cards filed in boxes not up on the screen were only "half" linked.) (* * Changes to NCFILEBOXCARD) (DEFINEQ (NC.FileBoxCollectChildren (LAMBDA (WindowOrTextStream Card NewChildren NoDisplayFlg) (* rht: "29-Jan-87 12:12") (* * Ask user for new children (either cards or fileboxes) for this filebox. Check to make sure that no circularities are introduced. This code is sort of the inverse of the NC.AddParents code and thus looks quite similar.) (* * rht 10/29/84: Added NoDisplayFlg to prevent error message when no appropriate elements exist. Also now returns ID if at least one child was added, NIL otherwise.) (* * fgh 11/13/85 Updated to handle Card object.) (* * rht 7/5/86: Now checks for readonly cards.) (* * rht 8/11/86: Added code to check to make sure that another operation is not in progress on this card when this fn is called.) (* * rht 10/17/86: Made successful filing operations NOT do dismiss.) (* * pmi 12/5/86: Modified message to NC.SelectNoteCards to mention SHIFT-selection.) (* * pmi 12/12/86: Removed obsolete ReturnLinksFlg argument in call to NC.SelectNoteCards.) (* * rht 1/28/87: Now activates parent box if necessary and saves before deactivating.) (OR Card (SETQ Card (NC.CoerceToCard WindowOrTextStream))) (LET ((Window (NC.FetchWindow Card)) OperationInProgress) (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 "Put Cards Here" OperationInProgress) else (NC.ProtectedCardOperation Card Put% Cards% Here (OR NewChildren (SETQ NewChildren (NC.SelectNoteCards NIL NIL NC.SelectingFileBoxChildrenMenu Card " Please shift-select new children."))) (COND ((AND NewChildren Card (LET ((WasActiveFlg ( NC.ActiveCardP Card))) (OR WasActiveFlg (NC.GetNoteCard Card)) (PROG1 (for NewChild in NewChildren bind OneHook when ( NC.MakeChildLink NewChild Card Window) do (SETQ OneHook T) finally (RETURN OneHook) ) (OR WasActiveFlg (NC.QuitCard Card NIL NIL NIL T NIL NIL T))))) Card) ((NULL NoDisplayFlg) (NC.PrintMsg Window NIL "No appropriate NoteCards or FileBoxes chosen." (CHARACTER 13) "Hence no children added." (CHARACTER 13)) (DISMISS 1000) (NC.ClearMsg Window T) NIL) (T NIL)))))))) ) (* * Changes to NCCARDS) (DEFINEQ (NC.AddParents (LAMBDA (WindowOrTextStream) (* rht: "29-Jan-87 12:13") (* 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.) (* * pmi 12/5/86: Modified message to NC.SelectNoteCards to mention SHIFT-selection.) (* * pmi 12/12/86: Removed obsolete ReturnLinksFlg argument in call to NC.SelectNoteCards.) (* * rht 1/28/87: Took out call to NC.ActivateCardAndDo. Need to make sure ParentCard gets saved after getting link if wasn't active originally.) (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 " Please shift-select the new parent FileBox(es).")) (AND NewParents Card (for ParentCard in NewParents bind OneHook when (LET ((WasActiveFlg (NC.ActiveCardP ParentCard))) (OR WasActiveFlg (NC.GetNoteCard ParentCard)) (PROG1 (NC.MakeChildLink Card ParentCard Window) (OR WasActiveFlg (NC.QuitCard ParentCard NIL NIL NIL T NIL NIL T)))) do (SETQ OneHook T) finally (RETURN OneHook))))))))) ) (PUTPROPS RHTPATCH188 COPYRIGHT ("Xerox Corporation" 1987)) (DECLARE: DONTCOPY (FILEMAP (NIL (806 4067 (NC.FileBoxCollectChildren 816 . 4065)) (4099 6927 (NC.AddParents 4109 . 6925) )))) STOP