Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!ub!acsu.buffalo.edu From: volaski@acsu.buffalo.edu (Maurice Volaski) Newsgroups: comp.sys.mac.programmer Subject: Re: LSC 4.0 cdev and editText items!! Message-ID: <51517@eerie.acsu.Buffalo.EDU> Date: 15 Dec 90 00:44:42 GMT References: <1990Dec14.213435.9514@noose.ecn.purdue.edu> <1990Dec14.220133.8499@ux1.cso.uiuc.edu> Sender: news@acsu.Buffalo.EDU Organization: SUNY Buffalo Lines: 20 Nntp-Posting-Host: ipsi.med.buffalo.edu In article <1990Dec14.220133.8499@ux1.cso.uiuc.edu> resnick@cogsci.uiuc.edu (Pete Resnick) writes: >moyman@ecn.purdue.edu writes: > >>What's the deal with textEdit items inside the cdev dialog!! > >> /* Setting the initial text in all of the editable text fields */ >> aStr = GetString(SysStrID); >> GetDItem(dp,lastItem+SysTextID,&itemType,&itemHandle,&itemRect); >> SetIText( itemHandle, *aStr); > >I always do a SelIText(CPDialog, myItem+numItems, 0, 32767) on the first >editText item in my DITL. Also, remember to do an InvalRect if you change >the text after initialization. Other than that, it should work fine. In addition, you should not be passing a master pointer to SetIText. It might move memory, including your string data. Copy it to a Str255 variable and pass that instead. Maurice Volaski