Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2005-01

Resource string in TStringList

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

pascalive

Some time ago there was a discussion about the use of Resource string in TList that resulted in a modification in TList.Get function (Created TList.RaiseIndexError function). I think that the same could be done in TStringList (i noticed that TStringList.Get function still uses resource string directly, at least in fpc 1.9.6 source package).

How about doing the same for TStringList.Add at
line 917 of stringl.inc [DupError : Error(SDuplicateString,0)] ??

Thanks

Luiz Americo

__________________________________________________________________________ Acabe com aquelas janelinhas que pulam na sua tela. AntiPop-up UOL - É grátis!
http://antipopup.uol.com.br/

Reply by email

Vincent Snijders
to pascalive
pascalive wrote 5 lines
Some time ago there was a discussion about the use of Resource string in TList that resulted in a modification in TList.Get function (Created TList.RaiseIndexError function). I think that the same could be done in TStringList (i noticed that TStringList.Get function still uses resource string directly, at least in fpc 1.9.6 source package). How about doing the same for TStringList.Add at line 917 of stringl.inc [DupError : Error(SDuplicateString,0)] ??

AFAIK, this is not necessary any more, because the compiler has been improved and now there no implicit try..finally block generated for resourcestrings.

Vincent.

Reply by email

pascalive
Show quoted text 12 lines
pascalive wrote: > Some time ago there was a discussion about the use of Resource string in TList that resulted in a modification in TList.Get function (Created TList.RaiseIndexError function). I think that the same could be done in TStringList (i noticed that TStringList.Get function still uses resource string directly, at least in fpc 1.9.6 source package). > > How about doing the same for TStringList.Add at > line 917 of stringl.inc [DupError : Error(SDuplicateString,0)] ?? > AFAIK, this is not necessary any more, because the compiler has been improved and now there no implicit try..finally block generated for resourcestrings. Vincent.

Even better :-).

Please desconsider the other post i did

Luiz.

__________________________________________________________________________ Acabe com aquelas janelinhas que pulam na sua tela. AntiPop-up UOL - É grátis!
http://antipopup.uol.com.br/

Reply by email

Michael Van Canneyt
to pascalive: Some time ago there was a discussion about the use of Resource string in TList that…
pascalive wrote 5 lines
Some time ago there was a discussion about the use of Resource string in TList that resulted in a modification in TList.Get function (Created TList.RaiseIndexError function). I think that the same could be done in TStringList (i noticed that TStringList.Get function still uses resource string directly, at least in fpc 1.9.6 source package). How about doing the same for TStringList.Add at line 917 of stringl.inc [DupError : Error(SDuplicateString,0)] ??

Since Peter disabled the use of an implicity try/finally for resource strings, I don't think it really matters now.

Michael.

Reply by email