(FILECREATED "25-Mar-87 18:20:08" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH227.;1 1765   

      changes to:  (VARS RHTPATCH227COMS))


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

(PRETTYCOMPRINT RHTPATCH227COMS)

(RPAQQ RHTPATCH227COMS ((* * Minor fix to NC.CoerceToInterestedWindow)
			  (* * Change to NCUTILITIES)
			  (FNS NC.CoerceToInterestedWindow)))
(* * Minor fix to NC.CoerceToInterestedWindow)

(* * Change to NCUTILITIES)

(DEFINEQ

(NC.CoerceToInterestedWindow
  (LAMBDA (WinOrCardOrNoteFile)                              (* rht: "25-Mar-87 18:18")

          (* * Try to return a window that can be used for NC.PrintMsg, NC.AskUser, etc. If arg is an open win, use that.
	  If displayed card, then use its window. If notefile, then use its notefile icon if open. Last hope is to use the 
	  session icon if open. Returning nil means that main prompt window will have to be used.)


    (DECLARE (GLOBALVARS NC.NoteCardsIconWindow))
    (LET (Card NoteFile)
         (COND
	   ((OPENWP WinOrCardOrNoteFile)
	     WinOrCardOrNoteFile)
	   ((AND (type? NoteFile WinOrCardOrNoteFile)
		   (OPENWP (NCP.NoteFileIconWindow WinOrCardOrNoteFile))))
	   ((AND (OR (NC.CardP WinOrCardOrNoteFile)
			 (TEXTSTREAMP WinOrCardOrNoteFile))
		   (NC.CardP (SETQ Card (NC.CoerceToCard WinOrCardOrNoteFile)))
		   (OPENWP (NC.FetchWindow Card))))
	   ((AND (NC.CardP Card)
		   (SETQ NoteFile (fetch (Card NoteFile) of Card))
		   (OPENWP (NCP.NoteFileIconWindow NoteFile))))
	   ((OPENWP NC.NoteCardsIconWindow))
	   (T NIL)))))
)
(PUTPROPS RHTPATCH227 COPYRIGHT ("Xerox Corporation" 1987))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (471 1683 (NC.CoerceToInterestedWindow 481 . 1681)))))
STOP