Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!megatest!sgrae From: sgrae@megatest.UUCP (Steve Graesser) Newsgroups: comp.sys.mac.programmer Subject: Re: MacApp question on TTEView Message-ID: <19126@megatest.UUCP> Date: 24 Jun 91 16:21:24 GMT References: <14200@goofy.Apple.COM> Organization: Megatest Corporation, San Jose, Ca Lines: 45 I would like to change the text in the TTEView between three different text Handles (text1, text2, text3) using a pull down menu. I was able to add the menu to the menu bar, select the proper text to display, but when trying to update the TEView Handle to the new text, it either comes a out with the wrong format or is trashed because of the repeated calls to StuffText. Let's assume fTEView is a valid TEView* in TDocument. case cText1: fTEView->StuffText(text1); fTEView->ForceRedraw(); break; case cText2: fTEView->StuffText(text2); fTEView->ForceRedraw(); break; case cText3: fTEView->StuffText(text3); fTEView->ForceRedraw(); break; After looking at the MacApp libraries for StuffText, SetText, etc. - I wasn't able to find a routine that just changed the fTEH (sp?) or fText handle to point the new Text Handle. The MacApp Methods stack on ETO#3, doesn't mention the destuctive behavior of StuffText or of SetText (BTW how do you get SetText to display more than 255 characters?) and MacApp411 doesn't have an entry for StuffText. Before I spent too much time figuring out how these work (I've had a look but am a little confused), can someone tell me whether I'm heading in the right direction ? Larry, Keith, Kent, anyone ? -- Steve Graesser {decwrl | amdcad}!megatest.uucp!sgrae Megatest Corp. 880 Fox Lane San Jose, CA 95131 | (408) 441-3077