Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!fornax!mcdonald From: mcdonald@fornax.UUCP (Ken Mcdonald) Newsgroups: comp.sys.mac.programmer Subject: Changing editText to statText in modal dialogs Message-ID: <419@fornax.UUCP> Date: 10 Mar 90 20:31:07 GMT Distribution: na Organization: School of Computing Science, SFU, Burnaby, B.C. Canada Lines: 22 Well, as the title says I have a situation where I want to change an editText item to a statText item. Fine. There was a brief discussion of this a short time ago, and several people pointed out that the tricky part was what to do if the editText item being changed is the currently selected item. I agree. If there is more than one editText item, the solution seems obvious--just use SelIText() to select one of the others, before changing the current one. But what do you do if the one you are working on is the only editText item? I tried setting the editFields field of the dialog record to -1, to tell it there were no longer any valid editText items, but nonetheless, when I typed in a character, TE put it up there on the screen where my editable item "used to" be. What I'm assuming is that ModalDialog() takes incoming characters and uses TE routines to place them in the active edit item. So the question is, how do I inform ModalDialog that there really is no active edit item? Do I have to go and muck around with the TERec? I've tried a number of things now, to no avail. Thanks for any help, Ken McDonald mcdonald@cs.sfu.ca