[net.micro.mac] GetIText

eric@plus5.UUCP (Eric W. Kiebler) (03/04/85)

I have had an interesting experience.  I wanted to creat a dialog box
with an editText filed in it, so that I could read a string into a
C program.  I created the dialog with the dialog alert editor, and then
used ModalDialog to let the Mac do the dirty work.  After return, I use
GetDItem to select the editText item, and then use GetIText() to get the
actual string.  The program works about 50% of the time.  I cut out
everything except the dialog stuff to make sure;  it bombs inside or
around DisposDialog I think...  debugging to the printer port dies in
our around there.

I think that I might not understand the ramifications of having 
GetNewDialog perform the heap allocation for me.  Does somebody out there
have C code that uses a dialog created externally and loaded as a
resource, that includes an editable text field with a default value,
and will place the value returned from ModalDialog() calls via the 
GetDItem() and GetIText() calls?

If so, could you send me a peek at it so I can sleep at night?

eric

-- 
..!ihnp4!wucs!plus5!eric	
..!ihnp4!plus5!eric
(314) 725-9492