(FILECREATED "27-Jun-86 21:17:54" {QV}<NOTECARDS>1.3K>FGHPATCH078.;1 3796   

      changes to:  (VARS FGHPATCH078COMS)
		   (FNS NC.CloseNoteCards NC.DeleteNoteCards))


(* Copyright (c) 1986 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT FGHPATCH078COMS)

(RPAQQ FGHPATCH078COMS ((* * Fix to promt windows)
			  (FNS NC.CloseNoteCards NC.DeleteNoteCards)))
(* * Fix to promt windows)

(DEFINEQ

(NC.CloseNoteCards
  (LAMBDA (CardIdOrCardList NoCheckFlg DontClearFlg InterestedWindow)
                                                             (* fgh: "27-Jun-86 21:16")

          (* * Close note acrds on the screen)



          (* * fgh 11/14/85 Updated to handle Card object.)



          (* * kirk 21Feb86 Added InterestedWindow)



          (* * fgh 6/27/86 Fixed call to NC.SelectNoteCards to use just InterestedWindow)


    (LET (Cards Window)
         (SETQ Cards (COND
	     ((LISTP CardIdOrCardList))
	     (CardIdOrCardList (NC.CoerceToCard CardIdOrCardList))
	     (T (NC.SelectNoteCards NIL NIL NC.DeleteSelectingMenu InterestedWindow NIL 
				      "Please select the cards to be closed."))))
         (SPAWN.MOUSE)
         (for Card in (MKLIST Cards) do (COND
						  ((AND (NC.ActiveCardP Card)
							  (SETQ Window (NC.FetchWindow Card)))
						    (COND
						      ((NEQ (NC.QuitCard Card T)
							      (QUOTE DON'T))
							(while (OPENWP Window) do (BLOCK))))))
		))))

(NC.DeleteNoteCards
  (LAMBDA (CardIdentifiers NoCheckFlg DontClearFlg InterestedWindow)
                                                             (* fgh: "27-Jun-86 21:16")
                                                             (* Delete note cards. If no card specified then get a 
							     list of note cards to be deleted.
							     Then delete these cards.)

          (* * fgh 11/11/85: Updated to handle new Card objects. Also split off main work of deleteing a single note card 
	  into NC.DeleteNoteCard function.)



          (* * kirk 21Feb86 Added InterestedWindow)



          (* * kirk 29Apr86 Now returns CardIdentifiers)



          (* * fgh 6/9/86 Added checks to see if other operations are in progress)



          (* * fgh 6/27/86 Fixed call to select nc to use appropriate InterestedWindow)


    (OR CardIdentifiers (SETQ CardIdentifiers (NC.SelectNoteCards NIL NIL 
									NC.DeleteSelectingMenu 
									InterestedWindow NIL 
						    "Please select the Note Cards to be deleted.")))
    (bind Card OperationInProgress for CardIdentifier in (MKLIST CardIdentifiers)
       do (SETQ Card (NC.CoerceToCard CardIdentifier))
	    (COND
	      ((NULL Card))
	      ((NC.TopLevelCardP Card)
		(NC.PrintMsg (NC.FetchWindow Card)
			       T "You cannot delete this FileBox." (CHARACTER 13))
		(DISMISS 1000)
		(NC.ClearMsg (NC.FetchWindow Card)
			       T))
	      (T (if (SETQ OperationInProgress (NC.OperationInProgress Card))
		     then (NC.PrintOperationInProgressMsg (NC.FetchWindow Card)
							      "Delete Card(s)" OperationInProgress)
		   else (NC.ProtectedCardOperation Card Delete% Card%(s%)
						     (AND (OR NoCheckFlg
								  (PROG1 (NC.AskYesOrNo
									     
							  "Are you sure you want to delete this?"
									     " -- " "Yes"
									     (NULL DontClearFlg)
									     (NC.FetchWindow Card)
									     NIL NIL)
									   (NC.ClearMsg)))
							    (NC.DeleteNoteCard Card)))))))
    CardIdentifiers))
)
(PUTPROPS FGHPATCH078 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (416 3714 (NC.CloseNoteCards 426 . 1546) (NC.DeleteNoteCards 1548 . 3712)))))
STOP