Moin!
Was hältst du denn von der Idee, eine
TObjectList zu nehmen und in dieser Tag-Objekte aufzunehmen:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9:
| TDay = class(TObject) private FDay: TDate; FChildStates: array[1..MaxChild] of TChildState public constructor Create(const ADay: TDate); property Day: TDate read FDate; property ChildStates[Index: Integer]: TChildState read GetChildState; end; |
TObjectList stammt von
TList ab, und da gibt es auch eine Methode .Sort, mit der kannst du die Liste dann nach Datum sortieren.
Zum Speichern: Je Tag eine Zeile, CommaText-Format zum Zerlegen via StringList, Aufbau:
Tag,x1,x2,x3,...,xn (xa: Zustand für Kind a an diesem Tag)
cu
Narses
There are 10 types of people - those who understand binary and those who don´t.