Wed, 18 Jun 1902 08:00:00 GMT
Collections in Turbo Vision
I'm having alot of difficulties using collections in a Turbo Vision program I am writing in Turbo Pascal 7. Here is the problem I'm trying to get input from a dilog box and then put it into a collection and save it to disk. I' m having no problem saving the information from the dialog box in a record, but the information is never saved to disk. I'm not sure if its saved to to the collection either. It would be very helpfull if someone could tell me how to properly transfer a record to a collection and then to disk it would be very helpfull. Please try not to too technical as I'm just learning the language. If you are responding could you also e-mail me notifying me that you have responded thanks. Here is the code I'm having problems with: type PMeet = ^TMeet; TMeet = record MeetName: string[20]; MeetLocation: string[20]; MeetDate: string[10]; Course, MemoLen: Word; MemoText: array[0..255] of Char; end; PMeetObj = ^TMeetObj; TMeetObj = object(TObject) TransferRecord: TMeet; constructor Load(var S: TStream); procedure Store(var S: TStream); end; procedure SaveMeets; var MeetFile: TBufStream; begin MeetFile.Init('MEETS.DAT', stOpenWrite, 1024); MeetFile.Put(MeetColl); MeetFile.Done; end; procedure TSplashApp.SaveMeetData; begin if MeetWindow^.Valid(cmClose) then begin MeetWindow^.GetData(MeetInfo); PMeetObj(MeetColl^.At(CurrentMeet))^.TransferRecord := MeetInfo; SaveMeets; end; end; -- ********************************************************************** * Ben de Groot e-mail at degro...@pathcom.com * **********************************************************************
|