home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!sun-barr!ames!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!resnick
- From: resnick@cogsci.uiuc.edu (Pete Resnick)
- Subject: Re: EditText items larger than 255 bytes?
- References: <BuAyG1.8n7@iat.holonet.net> <2AAE73AE.49F@intercon.com> <1992Sep10.200136.18513@tamsun.tamu.edu>
- Message-ID: <BuDs0G.35K@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: University of Illinois at Urbana
- Date: Thu, 10 Sep 1992 21:07:25 GMT
- Lines: 33
-
- bpb9204@tamsun.tamu.edu (Brent) writes:
-
- >amanda@intercon.com (Amanda Walker) writes:
- >|
- >|Close. TextEdit is limited to 32K, which puts a hard limit on the size of an
- >|editable text item. The key to getting more than 255 characters, however, is
- >|simply to avoid using GetIText & SetIText, but to use GetDItem and SetDItem
- >|directly, copying things into and out of thew handle yourself.
-
- You can't do this!
-
- >If you have a modal dialog box with 4 text areas, that's automatically
- >128k of RAM sucked up for 4x255 = 1020 bytes for actualy data (retrieved or
- >set via the SetIText/GetIText calls. If you used the MacOS calls to
- >the letter, that's a 1020/128k percent utilization... pretty awful.
-
- No, no, no. RTFM folks. IM I-408:
-
- Note: Actually, a single edit record is shared by all editText
- items; ...
-
- So, first of all, you can't look in the TextEdit record to see what's
- in it because you won't know where in that record the field you want
- is stored. Second of all, the hText field of the TextEdit record is a
- handle to the text which changes size as you add and delete text. It
- is not a static 32K of data.
-
- pr
- --
- Pete Resnick (...so what is a mojo, and why would one be rising?)
- Graduate assistant - Philosophy Department, Gregory Hall, UIUC
- System manager - Cognitive Science Group, Beckman Institute, UIUC
- Internet: resnick@cogsci.uiuc.edu
-