Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!news.cs.indiana.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!dmmg1176 From: dmmg1176@uxa.cso.uiuc.edu (David M Marcovitz) Newsgroups: comp.sys.mac.programmer Subject: Re: Get Text from a Dialog Message-ID: <1991Feb14.171003.25147@ux1.cso.uiuc.edu> Date: 14 Feb 91 17:10:03 GMT References: <1991Feb8.204416.390@ux1.cso.uiuc.edu> <1991Feb10.163404.17318@ux1.cso.uiuc.edu> <1991Feb11.034108.2882@ux1.cso.uiuc.edu> <1991Feb11.212221.16204@ux1.cso.uiuc.edu> Sender: news@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 29 dmmg1176@uxa.cso.uiuc.edu (David M Marcovitz) writes: >Well, I've gotten lots of code samples from people, and none of them >solve my problem. I went into ResEdit and set the default text of the >editText item. Now, no matter what I type in the editText item, >GetIText returns that default string. >The problem must be with the way I am interacting with Dialog Box >Class Library that I got off the net. I am going to scrap that and >write the code myself (with a lot of help from the Mac Programming >Primer) to deal with the dialog. >Thanks to those who sent me responses. I'm sure I'll use them when I >rewrite my code. I believe I understand the problem. It is definitely with the Dialog Box Class Library I was trying to use. This library just uses the dialog template created with ResEdit to get the initial items for the dialog box. It does not use the dialog manager to manipulate the dialog. Thus, when I use dialog manager functions (like GetDItem and GetIText) I get information about the original template, not the dialog box that is actually appearing on my screen. I should be able to use TextEdit routines (like TEGetText) to manipulate the TextEdit items. Or, I should be able to find methods in the library to do the same thing. -- David M. Marcovitz | internet: marcovitz@uiuc.edu Computer-based Education Research Lab | dmmg1176@uxa.cso.uiuc.edu University of Illinois | novanet: marco / cca / cerl