Re: [fpc-pascal] Pre-initialising a TStringList

2011-02-06 Thread Juha Manninen
Mark Morgan Lloyd kirjoitti sunnuntai 06 helmikuu 2011 17:50:05: > Is it possible to set up the text as an attribute (I'm avoiding the word > property here for obvious reasons) of the entire class rather than of an > instance? The const array could be outside of any class. It is global if declared

Re: [fpc-pascal] Pre-initialising a TStringList

2011-02-06 Thread Mark Morgan Lloyd
Juha Manninen wrote: Sven Barth kirjoitti sunnuntai 06 helmikuu 2011 16:24:49: FPreInitialisedSList.Text := StringsToUse; Note: You can also define StringsToUse as a typeless constant, e.g.: const StringsToUse = 'Line 1' + LineEnding + 'Line 2' + LineEnding +

Re: [fpc-pascal] Pre-initialising a TStringList

2011-02-06 Thread Juha Manninen
Sven Barth kirjoitti sunnuntai 06 helmikuu 2011 16:24:49: > FPreInitialisedSList.Text := StringsToUse; > > Note: You can also define StringsToUse as a typeless constant, e.g.: > > const StringsToUse = 'Line 1' + LineEnding + > 'Line 2' + LineEnding + >

Re: [fpc-pascal] Pre-initialising a TStringList

2011-02-06 Thread Sven Barth
On 06.02.2011 15:19, Howard Page-Clark wrote: On 06/2/11 1:55, Mark Morgan Lloyd wrote: Given one or more lines of text which are known at compilation time, and without the requirement to internationalize (these are, by RFC, US ASCII), what is the best way to get them into a TStringList? Perha

Re: [fpc-pascal] Pre-initialising a TStringList

2011-02-06 Thread Howard Page-Clark
On 06/2/11 1:55, Mark Morgan Lloyd wrote: Given one or more lines of text which are known at compilation time, and without the requirement to internationalize (these are, by RFC, US ASCII), what is the best way to get them into a TStringList? Perhaps there are better ways than the straightforwa

[fpc-pascal] Pre-initialising a TStringList

2011-02-06 Thread Mark Morgan Lloyd
Given one or more lines of text which are known at compilation time, and without the requirement to internationalize (these are, by RFC, US ASCII), what is the best way to get them into a TStringList? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not