home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!caen!nic.umass.edu!titan.ucc.umass.edu!s1949782
- From: s1949782@titan.ucc.umass.edu (Matthew Crocker)
- Subject: HELP, TVision Questions
- Message-ID: <1992Jul28.125427.10388@nic.umass.edu>
- Sender: usenet@nic.umass.edu (USENET News System)
- Nntp-Posting-Host: titan.ucc.umass.edu
- Organization: University of Massachusetts, Amherst
- Date: Tue, 28 Jul 1992 12:54:27 GMT
- Lines: 73
-
- Am I just totaly missing this or what?
-
- Here's my problem
-
- I have a Dialog box (tDialog) stored in a Resource file.
-
- The dialog has 2 inputlines and 2 listboxes (with scroll bars)
-
- When I Get the dialog from the resource I want to SetData
- for the inputlines and the listboxes. here's what I do.
-
- DialogData : Record
- FileName : String[127];
- SearchString : String[80];
- Available : pStringCollection;
- Selected : pStringCollection;
- End;
-
- Procedure MSCDialogType.Init;
-
- Begin
- DialogData.FileName := 'Events.Dat';
- DialogData.SearchString := '';
- DialogData.Available := New(pStringCollection,Init(100,10));
- DialogData.Selected := New(pStringCollection,Init(100,10));
-
- SetData(DialogData); <--- it crashes here;
- End;
-
- Procedure ShowDIalog;
- Var
- D : pMSCDialogType;
-
- Begin
- D := pMSCDIalogType(RezFile.Get('Dialog1'));
- If ValidView(D) Then
- Begin
- D^.Init;
- Desktop^.ExecView(D); <- If I Take out the SetData above it crashes
- D^.Done; Here.
- End;
- End;
-
- When I run this Under TurboDebuuger 2.51 it just hangs,
- When I run it under OS/2 Dos Box it causes OS/2 to freak and close the
- application.
-
- I think I know whats happening, The SetData is giving the two ListBox's the
- wrong Pointer and the ListBox.SetData is going on forever on the wrong
- pointers.
-
- What I want to know is HOW to setdata for a dialog like this
-
- I have tried setting the DialogData.Available & Selected := Nil but that
- doesn't help either.
-
- The order that its in the DialogData Record is the same order that they
- were inserted into the DIalog before it was resourced.
-
- This also doesn't work if I create the Dialog and the SetData (no Resource)
-
- Like I said Am I missing something? I have RTM but It doesn't help
- it should work they way I'm doing it right?
-
- advTHANKSance
-
- -Matt
-
- --
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- - Matthew Crocker
- s1949782@titan.ucc.umass.edu
- crocker@elux3.cs.ucc.umass.edu
-