(FILECREATED " 8-Jun-86 01:00:46" {QV}<NOTECARDS>1.3K>FGHPATCH067.;2 2251   

      changes to:  (VARS FGHPATCH067COMS)

      previous date: " 7-Jun-86 19:20:09" {QV}<NOTECARDS>1.3K>FGHPATCH067.;1)


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

(PRETTYCOMPRINT FGHPATCH067COMS)

(RPAQQ FGHPATCH067COMS ((* * Fix to bug %#90 Restart TEdit now longer messes up Quit)
			  (FNS NC.ResetTEditProcess)))
(* * Fix to bug %#90 Restart TEdit now longer messes up Quit)

(DEFINEQ

(NC.ResetTEditProcess
  (LAMBDA (TextStream)                                       (* fgh: " 7-Jun-86 19:16")

          (* * Added-process that actually does the works for NC.ResetTEdit. Kill the Tedit process running on TextStream and
	  the restart a new one. Goal is to clean up display if TEdit goea awary.)



          (* * rht 2/1/85: Changed to calls to NC.MarkCardDirty and NC.CardDirtyP.)



          (* * rht 10/8/85: Now closes prompt window if TEDIT call brought it up.)



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



          (* * fgh 6/7/86 Upodated to use NC.GETPROMPTWINDOW. Added WINDOWADDPROP call to make sure that NC.QUitCard is first
	  on the CLOSEFN list)


    (LET ((Window (WINDOW.FROM.TEDIT.THING TextStream))
	  (TextObj (TEXTOBJ TextStream))
	  DirtyFlg Card PromptWin)
         (COND
	   ((AND (WINDOWP Window)
		   (SETQ Card (NC.CoerceToCard Window)))
	     (SETQ DirtyFlg (NC.CardDirtyP Card))
	     (TEDIT.KILL TextStream)
	     (until (NULL (WINDOWPROP Window (QUOTE TEXTSTREAM))) do (BLOCK))
	     (TEDIT TextStream Window)
	     (until (TEXTSTREAMP (WINDOWPROP Window (QUOTE TEXTSTREAM))) do (BLOCK))
	     (COND
	       ((OPENWP (SETQ PromptWin (NC.GETPROMPTWINDOW Window NIL NIL T)))
		 (CLOSEW PromptWin)))
	     (NC.MarkCardDirty Card (NOT DirtyFlg))
	     (WINDOWPROP Window (QUOTE TITLE)
			   (NC.RetrieveTitle Card))
	     (WINDOWADDPROP Window (QUOTE CLOSEFN)
			      (FUNCTION NC.QuitCard)
			      T))))))
)
(PUTPROPS FGHPATCH067 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (500 2169 (NC.ResetTEditProcess 510 . 2167)))))
STOP