(FILECREATED " 4-Feb-86 21:50:32" {QV}<NOTECARDS>1.3K>FGHPATCH020.;1 4734   

      changes to:  (VARS FGHPATCH020COMS)
		   (FNS NC.MakeNoteCard))


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

(PRETTYCOMPRINT FGHPATCH020COMS)

(RPAQQ FGHPATCH020COMS ((* * redefineitions for removal of NC.MarkcardDeleted)
			  (FNS NC.MakeNoteCard NC.DeleteNoteCard)))
(* * redefineitions for removal of NC.MarkcardDeleted)

(DEFINEQ

(NC.MakeNoteCard
  (LAMBDA (NoteCardType NoteFile Title NoDisplayFlg TypeSpecificArgs Card)
                                                             (* fgh: " 4-Feb-86 21:49")
                                                             (* Make a new note card of type NoteCardType.
							     If type note specified, ask the user.)

          (* * rht 2/1/85: Added call to NC.MarkCardDirty.)



          (* * fgh 10/15/85 Added extra DatabaseStream argument for use by caching mechanism)



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


    (LET (ReturnValue Window)
         (COND
	   ((SETQ NoteCardType (OR NoteCardType (NC.AskNoteCardType (fetch (NoteFile Menu)
									     of NoteFile))))
	     (SETQ Card (OR (PROGN (type? Card Card)
					 Card)
				(NC.GetNewCard NoteFile)))
	     (NC.SetNewCardFlg Card T)
	     (NC.ActivateCard Card)
	     (NC.SetType Card NoteCardType)
	     (COND
	       ((OR (NULL (ERSETQ (SETQ ReturnValue (APPLY* (NC.MakeCardFn NoteCardType)
								      Card Title NoDisplayFlg 
								      TypeSpecificArgs))))
		      (NULL ReturnValue))
		 (NC.SetStatus Card (QUOTE DELETED))
		 (NC.DeactivateCard Card T))
	       (T (SETQ Window (WINDOWP ReturnValue))
		  (COND
		    ((NULL (NC.RetrieveTitle Card))
		      (SETQ Title (NC.SetTitle Card (SETQ Title (COND
						       ((STRINGP Title)
							 Title)
						       ((AND Title (OR (LITATOM Title)
									   (NUMBERP Title)))
							 (MKSTRING Title))
						       (T "Untitled")))))
		      (AND Window (WINDOWPROP Window (QUOTE TITLE)
						  Title)))
		    (T (NC.SetTitle Card (MKSTRING (NC.RetrieveTitle Card)))))
		  (COND
		    (Window (WINDOWADDPROP Window (QUOTE CLOSEFN)
					     (FUNCTION NC.QuitCard)
					     (QUOTE FIRST))
			    (WINDOWPROP Window (QUOTE NoteCardObject)
					  Card)
			    (WINDOWPROP Window (QUOTE OldCopyButtonEventFn)
					  (WINDOWPROP Window (QUOTE COPYBUTTONEVENTFN)
							(FUNCTION NC.CopyButtonEventFn)))))
		  (NC.SetTitleDirtyFlg Card T)             (* Reset the type in case of recursive calls change 
							     the type. Always want the highest level type in a 
							     recursive descent)
		  (NC.SetType Card NoteCardType)           (* Insure that a link ptr is set up during the first 
							     save)
		  (NC.SetLinksDirtyFlg Card T)
		  (NC.SetPropListDirtyFlg Card T)          (* Mark that substance is dirty.)
		  (NC.MarkCardDirty Card T)))
	     ReturnValue)))))

(NC.DeleteNoteCard
  (LAMBDA (Card)                                             (* fgh: " 4-Feb-86 21:48")

          (* * Delete a single note card from a NoteFile)


    (RESETLST (RESETSAVE (CURSOR WAITINGCURSOR))
		(RESETSAVE NIL (BQUOTE (NC.SetBeingDeletedFlg , Card NIL)))
		(WITH.MONITOR (NC.FetchMonitor (fetch (Card NoteFile) of Card))
			      (LET (ToLinks FromLinks Window)
			           (NC.SetBeingDeletedFlg Card T)
			           (SETQ ToLinks (NC.RetrieveToLinks Card))
			           (SETQ FromLinks (NC.RetrieveFromLinks Card))
			           (NC.SetToLinks Card NIL)
			           (NC.SetFromLinks Card NIL)
			           (for ToLink in ToLinks do (NC.DelFromLink ToLink))
			           (for FromLink in FromLinks
				      do (NC.DelToLink FromLink)
					   (NC.DelReferencesToCard (fetch (Link SourceCard)
									of FromLink)
								     Card))
			           (NC.SetStatus Card (QUOTE DELETED))
			           (COND
				     ((NC.ActiveCardP Card)
				       (NC.TurnOffDirtyFlgs Card)
				       (SETQ Window (NC.FetchWindow Card))
				       (AND Window (NC.GreyCard Card))
				       (NC.CloseAllPropListEditors Card)
				       (NC.QuitCard Card T T)))
			           (NC.SetNewCardFlg Card NIL)
			           (NC.DeactivateCard Card T))))))
)
(PUTPROPS FGHPATCH020 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (448 4652 (NC.MakeNoteCard 458 . 3211) (NC.DeleteNoteCard 3213 . 4650)))))
STOP