Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!noose.ecn.purdue.edu!mentor.cc.purdue.edu!j.cc.purdue.edu!brazil.psych.purdue.edu!zhou From: zhou@brazil.psych.purdue.edu (Albert Zhou) Newsgroups: comp.lang.pascal Subject: A PROBLEM ABOUT INPUTLINE IN TV Message-ID: <11844@j.cc.purdue.edu> Date: 12 Apr 91 19:42:09 GMT Sender: news@j.cc.purdue.edu Reply-To: zhou@brazil.psych.purdue.edu (Albert Zhou) Organization: Purdue University Lines: 28 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;