(FILECREATED " 6-Apr-87 12:29:24" {QV}<NOTECARDS>1.3K>NEXT>PMIPATCH031.;1 3406   

      changes to:  (VARS PMIPATCH031COMS)
		   (FNS NC.InspectorSelectionFn))


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

(PRETTYCOMPRINT PMIPATCH031COMS)

(RPAQQ PMIPATCH031COMS ((* * pmi 4/6/87: Added check for non-NIL AfterChangeFn before trying to 
			     apply it to the GlobalVar. Otherwise, trying to change a parameter which 
			     doesn't have this function defined would cause a break when it tried to 
			     apply NIL to the new value.)
			  (* * Change to NCPARAMETERS)
			  (FNS NC.InspectorSelectionFn)))
(* * pmi 4/6/87: Added check for non-NIL AfterChangeFn before trying to apply it to the 
GlobalVar. Otherwise, trying to change a parameter which doesn't have this function defined 
would cause a break when it tried to apply NIL to the new value.)

(* * Change to NCPARAMETERS)

(DEFINEQ

(NC.InspectorSelectionFn
  (LAMBDA (Property ValueFlg InspectWindow)                  (* pmi: " 6-Apr-87 12:20")

          (* * Actions to be taken when the user selects an item in the Inspector. If a value, then ignore.
	  If a property, ask for a new value.)



          (* * KLUDGED to hadle the NC.DefaultcardType property --- should be fixed to be general!!!!!!! fgh 10/23/84)



          (* * rht 10/25/84: Rewritten to access the NC.NoteCardsParameters variable's prop list to get all info including 
	  the name of the relevant globalvar for this parameter and an optional function. The latter returns a list of 
	  possible values. If no such function, then just toggle between Yes and No.)



          (* * rht 3/19/85: Rewritten to use new GLOBALPARAMETER record which contains globalvar's name and selection fn 
	  among other stuff.)



          (* * rht 5/1/86: Now can toggle either by clicking attribute or value.)



          (* * pmi 4/1/87: Added fifth field to GLOBALPARAMETER record: PARAMAFTERCHANGEFN. This function is called after the
	  Global parameter has been changed.)



          (* * pmi 4/6/87: Added check for non-NIL AfterChangeFn before trying to apply it to the GlobalVar.)


    (PROG (Answer (ParameterInfo (GETPROP (QUOTE NC.NoteCardsParameters)
					      Property))
		    SelectionFn AfterChangeFn GlobalVar)
	    (if (LISTP ParameterInfo)
		then (SETQ GlobalVar (fetch (GLOBALPARAMETER PARAMGLOBALVAR) of ParameterInfo)
			 )
		       (SETQ SelectionFn (fetch (GLOBALPARAMETER PARAMSELECTIONFN) of 
										    ParameterInfo))
		       (SETQ AfterChangeFn (fetch (GLOBALPARAMETER PARAMAFTERCHANGEFN)
						of ParameterInfo))
	      else (SETQ GlobalVar ParameterInfo))
	    (COND
	      (SelectionFn (if (NEQ (QUOTE NOTCHANGED)
					(SETQ Answer (APPLY* SelectionFn GlobalVar)))
			       then (SET GlobalVar Answer)
				      (if AfterChangeFn
					  then (APPLY* AfterChangeFn GlobalVar))
				      (INSPECTW.REDISPLAY InspectWindow Property)))
	      (T (COND
		   ((EVAL GlobalVar)
		     (SET GlobalVar NIL))
		   (T (SET GlobalVar T)))
		 (INSPECTW.REDISPLAY InspectWindow Property)))
	    (INSPECTW.SELECTITEM InspectWindow))))
)
(PUTPROPS PMIPATCH031 COPYRIGHT ("Xerox Corporation" 1987))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (931 3324 (NC.InspectorSelectionFn 941 . 3322)))))
STOP