(FILECREATED "28-May-87 00:29:55" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH269.;1 1967   

      changes to:  (VARS RHTPATCH269COMS)
		   (FNS NCP.CardAddProp))


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

(PRETTYCOMPRINT RHTPATCH269COMS)

(RPAQQ RHTPATCH269COMS ((* * Fixes bug reported by Mark Frisse whereby NCP.CardAddProp broke on new 
			     cards.)
			  (* * Change to NCPROGINT)
			  (FNS NCP.CardAddProp)))
(* * Fixes bug reported by Mark Frisse whereby NCP.CardAddProp broke on new cards.)

(* * Change to NCPROGINT)

(DEFINEQ

(NCP.CardAddProp
  (LAMBDA (Card Property ItemToAdd)                          (* rht: "28-May-87 00:27")

          (* * Adds ItemToAdd to the value of ID's Property property. Returns the old value. Same semantics as 
	  WINDOWADDPROP.)



          (* * rht 11/17/85: Updated to handle new card and notefile objects.)



          (* * rht 11/16/86: Changed call to NCP.ReportError)



          (* * rht 5/28/87: Fixed bug reported by Mark Frisse. Now works if PropList is NIL, as for a new card.)


    (if (NC.ValidCardP Card)
	then (LET* ((PropList (NC.RetrievePropList Card))
		      (OldPropValue (LISTGET PropList Property)))
		     (if (NOT (FMEMB ItemToAdd (MKLIST OldPropValue)))
			 then (if PropList
				    then (LISTPUT PropList Property (APPEND (MKLIST 
										     OldPropValue)
										  (LIST ItemToAdd)))
				  else (NC.SetPropList Card (BQUOTE (, Property (, ItemToAdd))))
				      )
				(if (NOT (NCP.CardCachedP Card))
				    then (NC.PutPropList Card)
				  else (NC.SetPropListDirtyFlg Card T)))
		 OldPropValue)
      else (NCP.ReportError (QUOTE NCP.CardAddProp)
				(CONCAT Card " not an existing card or box."))
	     NIL)))
)
(PUTPROPS RHTPATCH269 COPYRIGHT ("Xerox Corporation" 1987))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (565 1885 (NCP.CardAddProp 575 . 1883)))))
STOP