Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!apple!apple.com!chewy From: chewy@apple.com (Paul Snively) Newsgroups: comp.sys.mac.programmer Subject: Re: I hate it when Apple does this . . . Message-ID: <7133@goofy.Apple.COM> Date: 12 Mar 90 18:09:53 GMT Sender: usenet@Apple.COM Distribution: na Organization: Apple Computer, Inc. Lines: 56 References:<420@fornax.UUCP> <88@ndcvb.cc.nd.edu> <422@fornax.UUCP> In article <422@fornax.UUCP> mcdonald@fornax.UUCP (Ken Mcdonald) writes: > In article <88@ndcvb.cc.nd.edu>, dierks@ndcvb.cc.nd.edu (Timothy Dierks) writes: > > > > Inside Mac, page I-405, says that the handle returned by GetDItem for an > > editText item is a handle to the current text. If you just want to work with > > the current item, there is a textH member in a dialog record that is a > > handle to it. > > > > Tim Dierks > > go Irish > > My IM doesn't say this. (Different editions, I guess.) More particularly, > it specifically states that to extract or set the text in a statText or > editText item, one should pass the handle produced by GetDItem to GetIText > or SetIText. This is what made me think that the handle returned is not > a simple handle to a string--if it were, why the need for SetIText/GetI > Text? > > My original comment still stands...I hate it when Apple does this! :-) > > Ken McDonald > mcdonald@cs.sfu.ca I hate it when we do that, too. :-) As I recall, the reason that we have Set/GetIText is that there's some additional information about text being maintained by the Dialog Manager, such that you can't simply munge the text handle and expect the right things to happen. It's kind of unfortunate, and as I don't happen to have ROM sources in front of me ;-) I can't tell you exactly what goes on in there. Why don't you tell us what it is that you wish to accomplish, and perhaps someone here can tell you how to go about it? You may be quite safe using the text handle that GetDItem returns, for example, as long as you don't change anything about it. One possible example of such a use would be saving some text from a preferences dialog as a STR resource in a preferences file. __________________________________________________________________________ Paul Snively Macintosh Developer Technical Support Apple Computer, Inc. 1st Choice: Paul_Snively.DTS@qm.gateway.apple.com 2nd Choice: CHEWBACCA@applelink.apple.com Last Choice: chewy@apple.com Just because I work for Apple Computer, Inc. doesn't mean that I believe what they believe, or vice-versa. __________________________________________________________________________