dvlhma@cs.umu.se (Henrik Magnusson) (05/21/91)
Hello!
I have a small problem with Turbo Vision. I've created a dialog that
should get some information from the user. The dialog should get info
about what Sortorder the database should be printed, what posts in the
database should be printed, and at last if the user would like to filtrate
some information.
The Turbo Vison Guide says: "You need to arrange each view's data in the
same order as the group's views were inserted".
Haven't i done that??
Please help me find this problem!
Here is the procedure.
PROCEDURE TMyApp.DoPrintDialog;
TYPE DlgDataType = RECORD
CheckBoxData :Word;
RadioButtonData1 :Word;
InputLineData :STRING[20];
RadioButtonData2 :Word;
END;
VAR
Dialog :PDialog;
DlgData :DlgDataType;
B :PView;
R :TRect;
Control :Word;
BEGIN
WITH DlgData DO BEGIN
CheckBoxData := 15;
RadioButtonData1 := 0;
InputLineData := '';
RadioButtonData2 := 0;
END;
R. Assign(18,3,62,20);
Dialog := New(PDialog, Init(R,'Print'));
WITH Dialog^ DO BEGIN
GetClipRect(R);
R.Grow(-1,-1);
{ Other choices in dialog. }
R.Assign(2,5,40,7);
B := New(PCheckBoxes, Init(R,
NewSItem('Record#',
NewSItem('Artist',
NewSItem('Title',
NewSItem('RecordType',
NIL))))
));
Insert(B);
R.Assign(2,4,40,5);
Insert(New(PLabel, Init(R,'~C~hoice of posts to print',B)));
R.Assign(2,9,40,11);
B := New(PRadioButtons, Init(R,
NewSItem('Record#',
NewSItem('Artist',
NewSItem('Title',
NewSItem('RecordType',
NIL))))
));
Insert(B);
R.Assign(2,8,40,9);
Insert(New(PLabel, Init(R,'~F~iltrera post',B)));
{ Inputline for filter. }
R.Assign(2,12,40,13);
B := New(PInputLine, Init(R,20));
Insert(B);
R.Assign(2,11,40,12);
Insert(New(Plabel, Init(R, 'Filter',B)));
{ Place EXIT-buttons. }
R.Assign(32,14,42,16);
Insert(New(PButton, Init(R,'~C~ancel',cmCancel, bfNormal)));
R.Assign(20,14,30,16);
Insert(New(PButton, Init(R,'~O~K',cmOK, bfDefault)));
{ First Input... }
R.Assign(2,2,34,3);
B := New(PRadioButtons, Init(R,
NewSItem('Descending',
NewSItem('Ascending',
NIL))
));
Insert(B);
R.Assign(1,1,28,2);
Insert(New(PLabel, Init(R, '~S~ortorder', B)));
END;
Dialog^.SetData(DlgData);
Control := Desktop^.ExecView(Dialog);
IF Control <> cmCancel THEN
Dialog^.GetData(DlgData);
Dispose(Dialog,Done);
END;
RadioButtonData2 is the problem, it won't change value. And the only way
to place it is last in the record. whats wrong?
/NeNNe
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Henrik Magnusson :: "How'd you puncture that tyre?" ::
:: dvlhma@cs.umu.se :: "Ran over a milk bottle" ::
:: :: "Didn't you see it?" ::
:: Umeaa University, Sweden :: "Damn kid had it under his coat." ::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::dvlhma@cs.umu.se (Henrik Magnusson) (05/21/91)
In article <1991May21.082454.23351@cs.umu.se> dvlhma@cs.umu.se (Henrik Magnusson) writes: >Hello! >I have a small problem with Turbo Vision. I've created a dialog that >should get some information from the user. The dialog should get info >about what Sortorder the database should be printed, what posts in the >database should be printed, and at last if the user would like to filtrate >some information. > >The Turbo Vison Guide says: "You need to arrange each view's data in the >same order as the group's views were inserted". >Haven't i done that?? Hello again! Forget about my problem, for some kind of reason it works now, without changing anything! I probably just compiled it when the computer was in a bad mood. (mode). /NeNNe ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Henrik Magnusson :: "How'd you puncture that tyre?" :: :: dvlhma@cs.umu.se :: "Ran over a milk bottle" :: :: :: "Didn't you see it?" :: :: Umeaa University, Sweden :: "Damn kid had it under his coat." :: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::