Re: [Lazarus] Error: Generics without specialization cannot be used as a type for a variable

2011-05-11 Thread Sven Barth
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

Re: [Lazarus] Error: Generics without specialization cannot be used as a type for a variable

2011-05-10 Thread Peter Williams
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

Re: [Lazarus] Error: Generics without specialization cannot be used as a type for a variable

2011-05-10 Thread Hans-Peter Diettrich
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

Re: [Lazarus] Error: Generics without specialization cannot be used as a type for a variable

2011-05-09 Thread Peter Williams
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,

Re: [Lazarus] Error: Generics without specialization cannot be used as a type for a variable

2011-05-09 Thread Peter Williams
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:

[Lazarus] Error: Generics without specialization cannot be used as a type for a variable

2011-05-06 Thread Peter Williams
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

Re: [Lazarus] Error: Generics without specialization cannot be used as a type for a variable

2011-05-06 Thread Sven Barth
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