Ignore:
Timestamp:
Jan 1, 2011, 10:30:09 AM (14 years ago)
Author:
george
Message:
  • Modified: TMemo in demo replaced by TListView for better result readability.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Generics/TemplateGenerics/Demo/UMainForm.pas

    r107 r108  
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    99  ComCtrls, SpecializedList, SpecializedDictionary, SpecializedQueue,
    10   DateUtils;
     10  DateUtils, SpecializedMatrix;
    1111
    1212type
     
    1919    ButtonBenchmarkList: TButton;
    2020    ButtonCharList: TButton;
     21    ButtonMatrixInteger: TButton;
    2122    ButtonQueueInteger: TButton;
    2223    ButtonDictionaryString: TButton;
    2324    ButtonIntegerList: TButton;
    2425    ButtonStringList: TButton;
    25     MemoOutput: TMemo;
     26    ListViewOutput: TListView;
    2627    procedure ButtonBenchmarkDictionaryClick(Sender: TObject);
    2728    procedure ButtonBenchmarkListClick(Sender: TObject);
     
    2930    procedure ButtonDictionaryStringClick(Sender: TObject);
    3031    procedure ButtonIntegerListClick(Sender: TObject);
     32    procedure ButtonMatrixIntegerClick(Sender: TObject);
    3133    procedure ButtonListObjectClick(Sender: TObject);
    3234    procedure ButtonQueueIntegerClick(Sender: TObject);
     
    3739  public
    3840    Bitmap: TBitmap;
    39     procedure WriteLn(Text: string = '');
     41    procedure WriteOutput(Text1: string = ''; Text2: string = '');
    4042  end;
    4143
     
    5860  I: Integer;
    5961begin
    60   MemoOutput.Clear;
    61   WriteLn('TListInteger test');
     62  ListViewOutput.Clear;
     63  WriteOutput('TListInteger test');
    6264  List := TListInteger.Create;
    6365  with List do try
    64     WriteLn('AddArray([10, 20, 30, 40])');
    6566    AddArray([10, 20, 30, 40]);
    66     WriteLn('Implode: ' + Implode(',', IntToStr));
     67    WriteOutput('AddArray([10, 20, 30, 40])', Implode(',', IntToStr));
     68    Clear;
     69    WriteOutput('Clear', Implode(',', IntToStr));
     70    for I := 0 to 10 do Add(I);
     71    WriteOutput('for I := 0 to 10 do Add(I)', Implode(',', IntToStr));
     72    WriteOutput('Count', IntToStr(Count));
     73    Reverse;
     74    WriteOutput('Reverse', Implode(',', IntToStr));
     75    WriteOutput('First', IntToStr(First));
     76    WriteOutput('Last', IntToStr(Last));
     77    MoveItems(3, 2, 3);
     78    WriteOutput('MoveItems(3, 2, 3)', Implode(',', IntToStr));
     79    Insert(5, 11);
     80    WriteOutput('Insert(5, 11)', Implode(',', IntToStr));
     81  finally
     82    Free;
     83  end;
     84end;
     85
     86procedure TMainForm.ButtonMatrixIntegerClick(Sender: TObject);
     87var
     88  Matrix: TMatrixInteger;
     89  I: Integer;
     90begin
     91  ListViewOutput.Clear;
     92  WriteOutput('TListInteger test');
     93  Matrix := TMatrixInteger.Create;
     94  with Matrix do try
     95    WriteOutput('AddMatrix([10, 20, 30, 40])');
     96    //AddMatrix([10, 20, 30, 40]);
     97    WriteOutput('Implode: ' + Implode(',', IntToStr));
    6798    Clear;
    6899    for I := 0 to 10 do Add(I);
    69     WriteLn('Implode: ' + Implode(',', IntToStr));
    70     WriteLn('Count: ' + IntToStr(Count));
    71     WriteLn('Implode: ' + Implode(',', IntToStr));
    72     WriteLn('Reverse');
     100    WriteOutput('Implode: ' + Implode(',', IntToStr));
     101    WriteOutput('Count: Y: ' + IntToStr(Count.Y) + ', ' + IntToStr(Count.X));
     102    WriteOutput('Implode: ' + Implode(',', IntToStr));
     103    WriteOutput('Reverse');
    73104    Reverse;
    74     WriteLn('Implode: ' + Implode(',', IntToStr));
    75     WriteLn('First: ' + IntToStr(First));
    76     WriteLn('Last: ' + IntToStr(Last));
    77     MoveItems(3, 2, 3);
    78     WriteLn('Implode: ' + Implode(',', IntToStr));
    79     WriteLn('Insert(5, 11)');
    80     Insert(5, 11);
    81     WriteLn('Implode: ' + Implode(',', IntToStr));
     105    WriteOutput('Implode: ' + Implode(',', IntToStr));
     106    WriteOutput('First: ' + IntToStr(First));
     107    WriteOutput('Last: ' + IntToStr(Last));
     108    //MoveItems(3, 2, 3);
     109    WriteOutput('Implode: ' + Implode(',', IntToStr));
     110    WriteOutput('Insert(5, 11)');
     111    //Insert(5, 11);
     112    WriteOutput('Implode: ' + Implode(',', IntToStr));
    82113  finally
    83114    Free;
     
    95126  I: Integer;
    96127begin
    97   MemoOutput.Clear;
    98   WriteLn('TListObject test');
     128  ListViewOutput.Clear;
     129  WriteOutput('TListObject test');
    99130  List := TListObject.Create;
    100131  with List do try
    101132    AddArray([TObject.Create, TObject.Create, TObject.Create, TObject.Create]);
    102     WriteLn('Implode: ' + Implode(',', ObjectToStr));
     133    WriteOutput('AddArray([TObject.Create, TObject.Create, TObject.Create, TObject.Create])', Implode(',', ObjectToStr));
    103134    Clear;
     135    WriteOutput('Clear', Implode(',', ObjectToStr));
    104136    for I := 0 to 10 do Add(TObject.Create);
    105     WriteLn('Implode: ' + Implode(',', ObjectToStr));
    106     WriteLn('Count: ' + IntToStr(Count));
    107     WriteLn('Implode: ' + Implode(',', ObjectToStr));
    108     WriteLn('Reverse');
     137    WriteOutput('for I := 0 to 10 do Add(TObject.Create)', Implode(',', ObjectToStr));
     138    WriteOutput('Count', IntToStr(Count));
    109139    Reverse;
    110     WriteLn('Implode: ' + Implode(',', ObjectToStr));
     140    WriteOutput('Reverse', Implode(',', ObjectToStr));
    111141    MoveItems(3, 2, 3);
    112     WriteLn('Implode: ' + Implode(',', ObjectToStr));
     142    WriteOutput('MoveItems(3, 2, 3)', Implode(',', ObjectToStr));
    113143  finally
    114144    Free;
     
    121151  I: Integer;
    122152begin
    123   MemoOutput.Clear;
    124   WriteLn('TQueueInteger test');
     153  ListViewOutput.Clear;
     154  WriteOutput('TQueueInteger test');
    125155  Queue := TQueueInteger.Create;
    126156  with Queue do try
     
    128158    Enqueue(2);
    129159    Enqueue(3);
    130     WriteLn('Implode: ' + List.Implode(',', IntToStr));
    131     WriteLn('Enqueue: 4');
     160    WriteOutput('Enqueue(1),Enqueue(2),Enqueue(3) ', List.Implode(',', IntToStr));
    132161    Enqueue(4);
    133     WriteLn('Implode: ' + List.Implode(',', IntToStr));
    134     WriteLn('Dequeue: ' + IntToStr(Dequeue));
    135     WriteLn('Implode: ' + List.Implode(',', IntToStr));
     162    WriteOutput('Enqueue(4)', List.Implode(',', IntToStr));
     163    WriteOutput('Dequeued item', IntToStr(Dequeue));
     164    WriteOutput('Dequeue', List.Implode(',', IntToStr));
    136165  finally
    137166    Free;
     
    148177  Dictionary: TDictionaryStringString;
    149178begin
    150   MemoOutput.Clear;
    151   WriteLn('TDictionaryString test');
     179  ListViewOutput.Clear;
     180  WriteOutput('TDictionaryString test');
    152181  Dictionary := TDictionaryStringString.Create;
    153182  with Dictionary do try
     
    155184    Add('Key2', 'Value2');
    156185    Add('Key3', 'Value3');
    157     WriteLn('Implode: ' + Implode(',', StringPairToStr));
    158     WriteLn('Values[Key2]: ' + Values['Key2']);
    159     WriteLn('Values[Key2] = None');
     186    WriteOutput('Add(''Key1'', ''Value1''),Add(''Key1'', ''Value1''),Add(''Key1'', ''Value1'')', Implode(',', StringPairToStr));
     187    WriteOutput('Values[Key2]', Values['Key2']);
     188    WriteOutput('Values[Key2] = None');
    160189    Values['Key2'] := 'None';
    161     WriteLn('Values[Key2]: ' + Values['Key2']);
    162     WriteLn('Values[Key0]: ' + Values['Key0']);
    163     WriteLn('Keys[2]: ' + Keys[2]);
     190    WriteOutput('Values[Key2]', Values['Key2']);
     191    WriteOutput('Values[Key0]', Values['Key0']);
     192    WriteOutput('Keys[2]', Keys[2]);
    164193  finally
    165194    Free;
     
    176205  List: TListChar;
    177206begin
    178   MemoOutput.Clear;
    179   WriteLn('TListChar test');
     207  ListViewOutput.Clear;
     208  WriteOutput('TListChar test');
    180209  List := TListChar.Create;
    181210  with List do try
    182211    AddArray([' ', ' ', 'A', 'b', 'c', 'd', ' ']);
    183     WriteLn('Implode: ''' + Implode('', CharToStr) + '''');
    184     WriteLn('Implode: ' + Implode('', CharToStr));
    185     WriteLn('Reverse');
     212    WriteOutput('AddArray(['' '', '' '', ''A'', ''b'', ''c'', ''d'', '' ''])',
     213      '''' + Implode('', CharToStr) + '''');
    186214    Reverse;
    187     WriteLn('Implode: ''' + Implode('', CharToStr) + '''');
    188     WriteLn('TrimLeft');
     215    WriteOutput('Reverse', '''' + Implode('', CharToStr) + '''');
    189216    TrimLeft;
    190     WriteLn('Implode: ''' + Implode('', CharToStr) + '''');
    191     WriteLn('TrimRight');
     217    WriteOutput('TrimLeft', '''' + Implode('', CharToStr) + '''');
    192218    TrimRight;
    193     WriteLn('Implode: ''' + Implode('', CharToStr) + '''');
    194     WriteLn('UpperCase');
     219    WriteOutput('TrimRight', '''' + Implode('', CharToStr) + '''');
    195220    UpperCase;
    196     WriteLn('Implode: ''' + Implode('', CharToStr) + '''');
     221    WriteOutput('UpperCase', '''' + Implode('', CharToStr) + '''');
     222    LowerCase;
     223    WriteOutput('LowerCase', '''' + Implode('', CharToStr) + '''');
    197224  finally
    198225    Free;
     
    207234  I: Integer;
    208235begin
    209   MemoOutput.Clear;
     236  ListViewOutput.Clear;
    210237  try
    211238    List := TListPointer.Create;
    212     WriteLn('TListPointer...');
     239    List2 := TList.Create;
     240
    213241    StartTime := Now;
    214242    repeat
    215243      List.Add(1);
    216244    until (Now - StartTime) > OneSecond;
    217     WriteLn('Add: ' + IntToStr(List.Count) + ' ops/sec');
     245    WriteOutput('TListPointer.Add', IntToStr(List.Count) + ' ops/sec');
    218246    List.Clear;
    219247    Application.ProcessMessages;
     
    221249    StartTime := Now;
    222250    repeat
     251      List2.Add(1);
     252    until (Now - StartTime) > OneSecond;
     253    WriteOutput('TList.Add', IntToStr(List2.Count) + ' ops/sec');
     254    List2.Clear;
     255    Application.ProcessMessages;
     256
     257    StartTime := Now;
     258    repeat
    223259      List.Insert(0, 1);
    224260    until (Now - StartTime) > OneSecond;
    225     WriteLn('Insert: ' + IntToStr(List.Count) + ' ops/sec');
     261    WriteOutput('TListPointer.Insert', IntToStr(List.Count) + ' ops/sec');
    226262    List.Clear;
    227263    Application.ProcessMessages;
    228264
     265    StartTime := Now;
     266    repeat
     267      List2.Insert(0, 1);
     268    until (Now - StartTime) > OneSecond;
     269    WriteOutput('TList.Insert', IntToStr(List2.Count) + ' ops/sec');
     270    List2.Clear;
     271    Application.ProcessMessages;
     272
    229273    for I := 0 to 1000000 do
    230274      List.Add(1);
     
    235279      Inc(I);
    236280    until (Now - StartTime) > OneSecond;
    237     WriteLn('Delete: ' + IntToStr(I) + ' ops/sec');
     281    WriteOutput('TListPointer.Delete', IntToStr(I) + ' ops/sec');
    238282    List.Clear;
    239283    Application.ProcessMessages;
    240284
    241285    for I := 0 to 1000000 do
     286      List2.Add(1);
     287    StartTime := Now;
     288    I := 0;
     289    repeat
     290      List2.Delete(0);
     291      Inc(I);
     292    until (Now - StartTime) > OneSecond;
     293    WriteOutput('TList.Delete', IntToStr(I) + ' ops/sec');
     294    Application.ProcessMessages;
     295
     296    for I := 0 to 1000000 do
    242297      List.Add(1);
    243298    StartTime := Now;
     
    247302      Inc(I);
    248303    until (Now - StartTime) > OneSecond;
    249     WriteLn('Move: ' + IntToStr(I) + ' ops/sec');
     304    WriteOutput('TListPointer.Move', IntToStr(I) + ' ops/sec');
    250305    List.Clear;
    251306    Application.ProcessMessages;
    252307
    253308    for I := 0 to 1000000 do
     309    List2.Add(1);
     310    StartTime := Now;
     311    I := 0;
     312    repeat
     313      List2.Move(300000, 700000);
     314      Inc(I);
     315    until (Now - StartTime) > OneSecond;
     316    WriteOutput('TList.Move', IntToStr(I) + ' ops/sec');
     317    Application.ProcessMessages;
     318
     319    for I := 0 to 1000000 do
    254320      List.Add(1);
    255321    StartTime := Now;
     
    259325      Inc(I);
    260326    until (Now - StartTime) > OneSecond;
    261     WriteLn('Exchange: ' + IntToStr(I) + ' ops/sec');
     327    WriteOutput('TListPointer.Exchange', IntToStr(I) + ' ops/sec');
    262328    List.Clear;
    263329    Application.ProcessMessages;
    264330
    265331    for I := 0 to 1000000 do
     332    List2.Add(1);
     333    StartTime := Now;
     334    I := 0;
     335    repeat
     336      List2.Exchange(300000, 700000);
     337      Inc(I);
     338    until (Now - StartTime) > OneSecond;
     339    WriteOutput('TList.Exchange', IntToStr(I) + ' ops/sec');
     340    Application.ProcessMessages;
     341
     342    for I := 0 to 1000000 do
    266343      List.Add(1);
    267344    StartTime := Now;
     
    271348      Inc(I);
    272349    until (Now - StartTime) > OneSecond;
    273     WriteLn('IndexOf: ' + IntToStr(I) + ' ops/sec');
     350    WriteOutput('TListPointer.IndexOf', IntToStr(I) + ' ops/sec');
    274351    List.Clear;
    275352    Application.ProcessMessages;
     353
     354    for I := 0 to 1000000 do
     355    List2.Add(1);
     356    StartTime := Now;
     357    I := 0;
     358    repeat
     359      List2.IndexOf(Pointer(I mod List2.Count));
     360      Inc(I);
     361    until (Now - StartTime) > OneSecond;
     362    WriteOutput('TList.IndexOf', IntToStr(I) + ' ops/sec');
     363    Application.ProcessMessages;
     364
    276365  finally
    277366    List.Free;
    278   end;
    279 
    280   try
    281     List2 := TList.Create;
    282     WriteLn;
    283     WriteLn('Test TList...');
    284     StartTime := Now;
    285     repeat
    286       List2.Add(1);
    287     until (Now - StartTime) > OneSecond;
    288     WriteLn('Add: ' + IntToStr(List2.Count) + ' ops/sec');
    289     List2.Clear;
    290     Application.ProcessMessages;
    291 
    292     StartTime := Now;
    293     repeat
    294       List2.Insert(0, 1);
    295     until (Now - StartTime) > OneSecond;
    296     WriteLn('Insert: ' + IntToStr(List2.Count) + ' ops/sec');
    297     List2.Clear;
    298     Application.ProcessMessages;
    299 
    300     for I := 0 to 1000000 do
    301       List2.Add(1);
    302     StartTime := Now;
    303     I := 0;
    304     repeat
    305       List2.Delete(0);
    306       Inc(I);
    307     until (Now - StartTime) > OneSecond;
    308     WriteLn('Delete: ' + IntToStr(I) + ' ops/sec');
    309     Application.ProcessMessages;
    310 
    311     for I := 0 to 1000000 do
    312     List2.Add(1);
    313     StartTime := Now;
    314     I := 0;
    315     repeat
    316       List2.Move(300000, 700000);
    317       Inc(I);
    318     until (Now - StartTime) > OneSecond;
    319     WriteLn('Move: ' + IntToStr(I) + ' ops/sec');
    320     Application.ProcessMessages;
    321 
    322     for I := 0 to 1000000 do
    323     List2.Add(1);
    324     StartTime := Now;
    325     I := 0;
    326     repeat
    327       List2.Exchange(300000, 700000);
    328       Inc(I);
    329     until (Now - StartTime) > OneSecond;
    330     WriteLn('Exchange: ' + IntToStr(I) + ' ops/sec');
    331     Application.ProcessMessages;
    332 
    333     for I := 0 to 1000000 do
    334     List2.Add(1);
    335     StartTime := Now;
    336     I := 0;
    337     repeat
    338       List2.IndexOf(Pointer(I mod List.Count));
    339       Inc(I);
    340     until (Now - StartTime) > OneSecond;
    341     WriteLn('IndexOf: ' + IntToStr(I) + ' ops/sec');
    342     Application.ProcessMessages;
    343 
    344   finally
    345367    List2.Free;
    346368  end;
     
    355377  R: string;
    356378begin
    357   MemoOutput.Clear;
     379  ListViewOutput.Clear;
    358380  try
    359381    Dictionary := TDictionaryStringString.Create;
    360     WriteLn('TDictionaryStringString...');
    361     I := 0;
    362     StartTime := Now;
    363     repeat
    364       Dictionary.Add(IntToStr(I), IntToStr(I));
    365       I := I + 1;
    366     until (Now - StartTime) > OneSecond;
    367     WriteLn('Add pair: ' + IntToStr(Dictionary.Count) + ' ops/sec');
    368     Application.ProcessMessages;
    369 
    370     I := 0;
    371     StartTime := Now;
    372     repeat
    373       R := Dictionary.Values[IntToStr(I mod Dictionary.Count)];
    374       I := I + 1;
    375     until (Now - StartTime) > OneSecond;
    376     WriteLn('Values: ' + IntToStr(I) + ' ops/sec');
    377     Application.ProcessMessages;
    378 
    379     I := 0;
    380     StartTime := Now;
    381     repeat
    382       R := Dictionary.Keys[I mod Dictionary.Count];
    383       I := I + 1;
    384     until (Now - StartTime) > OneSecond;
    385     WriteLn('Keys: ' + IntToStr(I) + ' ops/sec');
    386     Application.ProcessMessages;
    387 
    388     I := 0;
    389     StartTime := Now;
    390     repeat
    391       R := Dictionary.Items[I mod Dictionary.Count].Value;
    392       I := I + 1;
    393     until (Now - StartTime) > OneSecond;
    394     WriteLn('Values by index: ' + IntToStr(I) + ' ops/sec');
    395     Application.ProcessMessages;
    396   finally
    397     Dictionary.Free;
    398   end;
    399 
    400   try
    401382    Dictionary2 := TStringList.Create;
    402383    Dictionary2.NameValueSeparator := '|';
    403     WriteLn;
    404     WriteLn('TStringList...');
     384
     385    I := 0;
     386    StartTime := Now;
     387    repeat
     388      Dictionary.Add(IntToStr(I), IntToStr(I));
     389      I := I + 1;
     390    until (Now - StartTime) > OneSecond;
     391    WriteOutput('TDictionaryStringString.Add', IntToStr(Dictionary.Count) + ' ops/sec');
     392    Application.ProcessMessages;
     393
    405394    I := 0;
    406395    StartTime := Now;
     
    409398      I := I + 1;
    410399    until (Now - StartTime) > OneSecond;
    411     WriteLn('Add pair: ' + IntToStr(Dictionary2.Count) + ' ops/sec');
     400    WriteOutput('TStringList.Add', IntToStr(Dictionary2.Count) + ' ops/sec');
     401    Application.ProcessMessages;
     402
     403    I := 0;
     404    StartTime := Now;
     405    repeat
     406      R := Dictionary.Values[IntToStr(I mod Dictionary.Count)];
     407      I := I + 1;
     408    until (Now - StartTime) > OneSecond;
     409    WriteOutput('TDictionaryStringString.Values', IntToStr(I) + ' ops/sec');
    412410    Application.ProcessMessages;
    413411
     
    418416      I := I + 1;
    419417    until (Now - StartTime) > OneSecond;
    420     WriteLn('Values: ' + IntToStr(I) + ' ops/sec');
     418    WriteOutput('TStringList.Values', IntToStr(I) + ' ops/sec');
     419    Application.ProcessMessages;
     420
     421    I := 0;
     422    StartTime := Now;
     423    repeat
     424      R := Dictionary.Keys[I mod Dictionary.Count];
     425      I := I + 1;
     426    until (Now - StartTime) > OneSecond;
     427    WriteOutput('TDictionaryStringString.Keys', IntToStr(I) + ' ops/sec');
    421428    Application.ProcessMessages;
    422429
     
    427434      I := I + 1;
    428435    until (Now - StartTime) > OneSecond;
    429     WriteLn('Keys: ' + IntToStr(I) + ' ops/sec');
     436    WriteOutput('TStringList.Keys(Names)', IntToStr(I) + ' ops/sec');
     437    Application.ProcessMessages;
     438
     439    I := 0;
     440    StartTime := Now;
     441    repeat
     442      R := Dictionary.Items[I mod Dictionary.Count].Value;
     443      I := I + 1;
     444    until (Now - StartTime) > OneSecond;
     445    WriteOutput('TDictionaryStringString.Items', IntToStr(I) + ' ops/sec');
    430446    Application.ProcessMessages;
    431447
     
    436452      I := I + 1;
    437453    until (Now - StartTime) > OneSecond;
    438     WriteLn('Values by index: ' + IntToStr(I) + ' ops/sec');
    439     Application.ProcessMessages;
    440   finally
     454    WriteOutput('TStringList.Items(ValueFromIndex)', IntToStr(I) + ' ops/sec');
     455    Application.ProcessMessages;
     456
     457  finally
     458    Dictionary.Free;
    441459    Dictionary2.Free;
    442460  end;
     
    452470  List: TListString;
    453471begin
    454   MemoOutput.Clear;
    455   WriteLn('TListString test');
     472  ListViewOutput.Clear;
     473  WriteOutput('TListString test');
    456474  List := TListString.Create;
    457475  with List do try
    458476    AddArray(['One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven']);
    459     WriteLn('Count: ' + IntToStr(Count));
    460     WriteLn('Implode: ' + Implode(',', StrToStr));
    461     WriteLn('Reverse');
     477    WriteOutput('Count', IntToStr(Count));
     478    WriteOutput('Implode', Implode(',', StrToStr));
     479    WriteOutput('Reverse');
    462480    Reverse;
    463     WriteLn('Implode: ' + Implode(',', StrToStr));
    464     WriteLn('First: ' + First);
    465     WriteLn('Last: ' + Last);
     481    WriteOutput('Implode', Implode(',', StrToStr));
     482    WriteOutput('First', First);
     483    WriteOutput('Last', Last);
    466484    MoveItems(2, 3, 3);
    467     WriteLn('Implode: ' + Implode(',', StrToStr));
     485    WriteOutput('Implode', Implode(',', StrToStr));
    468486  finally
    469487    Free;
     
    475493end;
    476494
    477 procedure TMainForm.WriteLn(Text: string = '');
    478 begin
    479   MemoOutput.Lines.Add(Text);
     495procedure TMainForm.WriteOutput(Text1: string = ''; Text2: string = '');
     496var
     497  NewItem: TListItem;
     498begin
     499  NewItem := ListViewOutput.Items.Add;
     500  NewItem.Caption := Text1;
     501  NewItem.SubItems.Add(Text2);
    480502end;
    481503
Note: See TracChangeset for help on using the changeset viewer.