0

I must load predefined values from a Ini file into a Listbox, assume my ini file look like this

  [MyValues]
  a=test1,test2,test3,test4
  b=val1,val2
  c=bla1,bla2
  .....

The current code idea goes like this

   TMyValues = Class()
      aKeyChar : Char;      //  search the list based on this Char
      Values : TStringList;
      ....
      end;



  MyCompleteData =classe (TObjectList)
        ....

        procedure add (TMyValues);
        procedure get (TMyValues);

        end;



  //  create the list of stringList  

  AMyCompleteData  :=TMyCompleteData .Create;


  //  create Ini file String Lists //  or List of List 

  .....

  //    Load this stuff from Ini file 

  .....

  if aValue = 'a' then
           begin

           //   Search for the List, with a as Key Char 

           //   load values inti the ListBox
           ThisListBox.Items := AValueStrList;

           end;

Can I write very efficient code using DELPHI syntax feature ATTRIBUTES and can I get a search for a Key Char while using attributed implemented ?

4

0 回答 0