Neven Not exactly what I was after :-(
I have implemented the following (where SL is a Stringlist in the Names=Values format you suggested), but would be interested if a variant of your method could do the same more efficiently. function GetValue(Entry: String; col: Integer): String; var StRec: TstringList; begin try StRec := TStringList.Create; StRec.CommaText := SL.Values[Entry]; Result := StRec[col]; finally StRec.Free; Mark end; end; On 8 Nov 2002 at 11:00, Neven MacEwan wrote: > Mark > > Sorry I coded it as a Method (hence Self is the TStringList) > > as a function > > function GetValue(Strings: TStringList; Index: integer): string; > begin > Result := copy(Strings[Index],pos('=',Strings[Index])+1,MaxInt) > end; > > > N > > > ----- Original Message ----- > From: "Mark Howard" <[EMAIL PROTECTED]> > To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> > Sent: Friday, November 08, 2002 10:35 AM > Subject: Re: [DUG]: Multi-column String List? > > > > Sorry, not trivial enough for me. > > I can't figure out how to call it - 'Self' is putting me off. > > > > Mark > > > > On 7 Nov 2002 at 16:46, Neven MacEwan wrote: > > > > > No > > > > > > but what you are asking is trivial > > > > > > function GetValue(Index: integer): string; > > > begin > > > Result := copy(Self[Index],pos('=',Self[Index])+1,MaxInt) > > > end; > > > > > > Neven > > > > > > ----- Original Message ----- > > > From: "Mark Howard" <[EMAIL PROTECTED]> > > > To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> > > > Sent: Thursday, November 07, 2002 4:34 PM Subject: Re: [DUG]: > > > Multi-column String List? > > > > > > > > > > Neven > > > > > > > > Can Values be an enumerated list? ie can you refer > > > > to Values[i]? > > > > Couldn't see any reference to that in Help. > > > > > > > > Mark > > > > > > > > On 7 Nov 2002 at 15:10, Neven MacEwan wrote: > > > > > > > > > Mark > > > > > > > > > > You could use a std string list with the 'name' and 'values' > > > > > properties > > > > > > > > > > Entry_Field=Col1,Col2,Col3.... etc > > > > > > > > > > Beyond that I'd look at kbmMemTable > > > > > > > > > > HTH > > > > > > > > > > Neven > > > > > > > > > > ----- Original Message ----- > > > > > From: "Mark Howard" <[EMAIL PROTECTED]> > > > > > To: "Multiple recipients of list delphi" > > > > > <[EMAIL PROTECTED]> Sent: Thursday, November 07, 2002 3:00 > > > > > PM Subject: [DUG]: Multi-column String List? > > > > > > > > > > > > > > > > Hi all > > > > > > > > > > > > I want a very simple way to load and access a small lookup > > > > > > table from a comma delimited text file. > > > > > > > > > > > > What would be ideal would be an implementation of a multi > > > > > > column string list that would allow: LoadFromFile and access > > > > > > to a particular row of columns to the right of #1 using > > > > > > Items.IndexOf('Entry_Field') to determine the row > > > > > > > > > > > > I feel sure there must be something simple available. > > > > > > > > > > > > TIA > > > > > > > > > > > > Mark > > > > > > ------------------------------------------------------------ > > > > > > ---- ---- ------ > > > > > - > > > > > > New Zealand Delphi Users group - Delphi List - > > > > > > [EMAIL PROTECTED] > > > > > > Website: http://www.delphi.org.nz > > > > > > To UnSub, send email to: [EMAIL PROTECTED] > > > > > > with body of "unsubscribe delphi" > > > > > > Web Archive at: > > > > > > http://www.mail-archive.com/delphi%40delphi.org.nz/ > > > > > > > > > > > > > > > > -------------------------------------------------------------- > > > > > ---- ---- ----- > > > > > New Zealand Delphi Users group - Delphi List - > > > > > [EMAIL PROTECTED] > > > > > Website: http://www.delphi.org.nz > > > > > To UnSub, send email to: [EMAIL PROTECTED] > > > > > with body of "unsubscribe delphi" > > > > > Web Archive at: > > > > > http://www.mail-archive.com/delphi%40delphi.org.nz/ > > > > > > > > > > > > > > > > > ---------------------------------------------------------------- > > > > ---- ------ > > > - > > > > New Zealand Delphi Users group - Delphi List - > > > > [EMAIL PROTECTED] > > > > Website: http://www.delphi.org.nz > > > > To UnSub, send email to: [EMAIL PROTECTED] > > > > with body of "unsubscribe delphi" > > > > Web Archive at: > > > > http://www.mail-archive.com/delphi%40delphi.org.nz/ > > > > > > > > > > ------------------------------------------------------------------ > > > ---- ----- > > > New Zealand Delphi Users group - Delphi List - > > > [EMAIL PROTECTED] > > > Website: http://www.delphi.org.nz > > > To UnSub, send email to: [EMAIL PROTECTED] > > > with body of "unsubscribe delphi" > > > Web Archive at: > > > http://www.mail-archive.com/delphi%40delphi.org.nz/ > > > > > > > > > -------------------------------------------------------------------- > > ------ > - > > New Zealand Delphi Users group - Delphi List - > > [EMAIL PROTECTED] > > Website: http://www.delphi.org.nz > > To UnSub, send email to: [EMAIL PROTECTED] > > with body of "unsubscribe delphi" > > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ > > > > ---------------------------------------------------------------------- > ----- > New Zealand Delphi Users group - Delphi List - > [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > To UnSub, send email to: [EMAIL PROTECTED] > with body of "unsubscribe delphi" > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ > --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/