zhou@brazil.psych.purdue.edu (Albert Zhou) (04/13/91)
I just started using TV, and I have the following code using InputLine which didn't do what I want -- The dialog box didn't close after I input a line (The only way to close it is to press ESC). SetData didn't work either, and it displayed a garbage line at the start. Following is part of the code: Function getinput: string; var data : DialogData; d : PDialog; R : TRect; c : word; begin Data.InputLineData := 'albert'; R.assign(20, 4, 55, 7); D := new(PDialog, init(R, '')); R.assign(2, 1, 22, 2); D^.insert(new(PStaticText, init(R, 'Enter your name:'))); R.assign(24, 1, 30, 2); D^.insert(new(PInputLine, Init(R, 5))); R.assign(24, 1, 30, 2); D^.SetData(data); c := desktop^.execview(d); if c <> cmCancel then D^.GetData(data); getinput := data.inputLineData; end;