Am 10.05.2011 23:19, schrieb Hans-Peter Diettrich:
Take e.g. a TObjectList, and replace all occurences of TObject by
T, to make it a generic class:
TMyListT = class(TList)
...
function Add(AObject: T): Integer;
...
end;
You need to use T, not T. The T after the class name is
basically a
Hi All,
[snip] Unit1.pas http://pastebin.com/wuEft4Kb Why do you declare
TIsland as a generic if you don't use the type T anywhere?
I have (though all of these posts) been trying to follow the instructions for
GENERICS on this page:http://wiki.lazarus.freepascal.org/GenericsThis page
Peter Williams schrieb:
The reason why I am choosing a Generic or Specialize is so that I have
accept to the
Sort procedure of TList. I am not sure if I am doing this correctly.
The Sort method requires a user-supplied *compare function*. Only that
function must know about the type and
Hi Sven all,
Date: Fri, 6 May 2011 22:06:55 +0200
From: pascaldra...@googlemail.com
To: lazarus@lists.lazarus.freepascal.org
Subject: Re: [Lazarus] Error: Generics without specialization cannot be used
as a type for a variable
On 06.05.2011 17:58, Peter Williams wrote:
Hi,
Hi All,
From: pewilliams2...@live.com
To: lazarus@lists.lazarus.freepascal.org
Date: Mon, 9 May 2011 16:32:04 +1000
Subject: Re: [Lazarus] Error: Generics without specialization cannot be used as
a type for a variable
Hi Sven all,
Date: Fri, 6 May 2011 22:06:55 +0200
From:
Hi,
Options changed, recompiling clean with -BHint: Start of reading config file
/etc/fpc.cfgHint: End of reading config file /etc/fpc.cfgFree Pascal Compiler
version 2.4.2-0 [2010/11/11] for i386Copyright (c) 1993-2010 by Florian
KlaempflTarget OS: Linux for i386Compiling
On 06.05.2011 17:58, Peter Williams wrote:
Hi,
Options changed, recompiling clean with -B
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.4.2-0 [2010/11/11] for i386
Copyright (c) 1993-2010 by Florian Klaempfl
Target