(FILECREATED "13-Jul-86 14:04:30" {QV}<NOTECARDS>1.3K>KIRKPATCH014.;1 2741   

      changes to:  (VARS KIRKPATCH014COMS x))


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

(PRETTYCOMPRINT KIRKPATCH014COMS)

(RPAQQ KIRKPATCH014COMS ((* * adds yet another check to NC.GetCardTypeField)
			   (MACROS NC.GetCardTypeField)
			   (* * New function in NCTYPESMECH)
			   (FNS NC.CardTypeFieldInheritedP)))
(* * adds yet another check to NC.GetCardTypeField)

(DECLARE: EVAL@COMPILE 
(DEFMACRO NC.GetCardTypeField (FieldName CardTypeNameForm)
	  (* * Fetch the card type datatype field passed directly for FieldName
	     (for the card type whose name is in a variable passed as the second parameter))
	  (* * rht 4/11/86: Was trying to autoload if field of card type was nil. Now only tries to 
	     autoload if CardTypeRecord is nil or if StubFlg is non-nil.)
	  (* * fgh 4/25/86 Fix to above fix. Checks for CardTypeRecord before doing fetch's in 2 
	     cluase of COND.)
	  (* * kirk&fgh 26Jun86 Added check for InheritedFlg to above fix. Changed to a DEFMACRO)
	  (BQUOTE (LET ((CardTypeName , CardTypeNameForm)
			CardTypeRecord)
		       (SETQ CardTypeRecord (NC.CardTypeRecord CardTypeName))
		       (COND ((AND CardTypeRecord (NULL (fetch (NoteCardType StubFlg)
							       of CardTypeRecord)))
			      (fetch (NoteCardType , FieldName)
				     of CardTypeRecord))
			     ((AND CardTypeRecord (fetch (NoteCardType StubFlg)
							 of CardTypeRecord)
				   (AND (MEMB , (KWOTE (MKATOM (CONCAT FieldName (QUOTE InheritedFlg))
							       ))
					      (RECORDFIELDNAMES CardTypeRecord))
					(NOT (NC.CardTypeFieldInheritedP (QUOTE , FieldName)
									 CardTypeRecord)))
				   (fetch (NoteCardType , FieldName)
					  of CardTypeRecord)))
			     ((NC.AutoLoadCardType CardTypeName (QUOTE , FieldName)
						   (AND CardTypeRecord (fetch (NoteCardType 
									       FullDefinitionFile)
									      of CardTypeRecord)))
			      (fetch (NoteCardType , FieldName)
				     of
				     (NC.CardTypeRecord CardTypeName)))
			     (T (NC.ReportError NIL (CONCAT "Unknown note card type:  " CardTypeName 
							    "   or card type field name: "
							    (QUOTE , FieldName))))))))
)
(* * New function in NCTYPESMECH)

(DEFINEQ

(NC.CardTypeFieldInheritedP
  (LAMBDA (FieldName CardTypeRecord)                         (* kirk: "12-Jul-86 19:12")

          (* * kirk 12/6/86 returns T if the CardTypeRecord inherits FieldName)



          (* * kirk 12/6/86 first created)


    (RECORDACCESS (MKATOM (CONCAT FieldName (QUOTE InheritedFlg)))
		    CardTypeRecord)))
)
(PUTPROPS KIRKPATCH014 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (2278 2658 (NC.CardTypeFieldInheritedP 2288 . 2656)))))
STOP