Re: [Lazarus] Run Without Debbuging Shift+Ctrl+F9
On 05/05/2011 19:15, Flávio Etrusco wrote: Second biggest issue is nor git-gui nor smartgit want to let me create a patch from the revision :-/ Guess I'll have to go the cmdline way :-$ Makes no sense, but the follow should work: 8-8-8-8-8 Creating and emailing a patch = If simply want to fix something small and email a patch to a mailing list on NNTP server, you can do the following: $ cd lazarus $ git branch myfeature $ (edit files) $ git add (files) $ git commit -m 'Explain what I changed' $ git format-patch origin/upstream 8-8-8-8-8 More tips can be found on my wiki: http://opensoft.homeip.net:8080/wiki/wiki.cgi?p=git-tips http://opensoft.homeip.net:8080/wiki/wiki.cgi?p=git-howto ...and for some fun with git and repository statistics... http://opensoft.homeip.net:8080/wiki/wiki.cgi?p=git-and-repository-statistics Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Run Without Debbuging Shift+Ctrl+F9
On 05/05/2011 22:43, Flávio Etrusco wrote: Does no debugger behave this way? Actually I don't think Delphi behaved like that, i guess it simply launched the application (maybe it deserves a new name if we go this route ;-) We're not creating delphi ! I don't think we need a 2nd way of running processes. The ide still needs the info. Marc Of course. It only that I often wanted this in lazarus when I needed several instances to run concurrently. Then the IDE can no longer keep track, if the process runs, and further attempts to compile will fail (exe locked / at least on windows). Though I can see your requirement. I would think, that such an independent launcher, would be best done as an installable package. It can then be discussed, if such a package could be included in the lazarus distribution, or was to be kept as separate download. Btw, there is another scenario: One might want to launch an app without debugger (maybe because some library loaded at launch does not work in gdb), and then attach to the running app (assuming attach is implemented). -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] dtm_maker project compile errors with TList code.
Hi All, I have uploaded my project with compile time errors to here: Download link: http://hotfile.com/dl/116917459/8effac0/dtm_maker_002.zip.htmlAnd I am getting these errors: 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 island_maker.lprCompiling unit1.pasCompiling set_max.pasunit1.pas(191,18) Error: No member is provided to access propertyunit1.pas(192,21) Error: No member is provided to access propertyunit1.pas(193,20) Error: No member is provided to access propertyunit1.pas(194,10) Error: No member is provided to access propertyunit1.pas(195,10) Error: No member is provided to access propertyunit1.pas(196,24) Error: No member is provided to access propertyunit1.pas(197,14) Error: No member is provided to access propertyunit1.pas(498,37) Error: Incompatible type for arg no. 3: Got Array[1..2] Of AnsiString, expected description_typeunit1.pas(184,21) Hint: Found declaration: constructor TIsland.Create(const Terrain_type,const Char,const description_type,const LongInt,const LongInt,const LongInt,const exit_type);unit1.pas(503,15) Error: Identifier not found myListunit1.pas(521,12) Error: Illegal qualifierunit1.pas(529,14) Warning: range check error while evaluating constantsunit1.pas(540,26) Error: Illegal qualifierunit1.pas(542,17) Error: Illegal qualifierunit1.pas(544,43) Error: Illegal qualifierunit1.pas(545,34) Error: Illegal qualifierunit1.pas(546,34) Error: Illegal qualifierunit1.pas(550,43) Error: Illegal qualifierunit1.pas(559,12) Error: Illegal qualifierunit1.pas(588,63) Error: Incompatible type for arg no. 7: Got Pointer, expected exit_typeunit1.pas(184,21) Hint: Found declaration: constructor TIsland.Create(const Terrain_type,const Char,const description_type,const LongInt,const LongInt,const LongInt,const exit_type);unit1.pas(607) Fatal: There were 18 errors compiling module, stopping These errors relate to me modifying my code to try to use a TList. Could someone please look at my code and see if you can point of my errors and fixes. Best Regards,Peter E WilliamsHobart, Australia -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Strange access violation
Al 04/05/2011 17:36, En/na Mattias Gaertner ha escrit: Luca Olivetti l...@wetron.es hat am 4. Mai 2011 um 13:44 geschrieben: ... Of course it isn't reproducible (it happened only once, inside a TOpendialog.Execute, I tried many many times after the access violation with no problem). Any idea? Maybe a heap/stack corruption. Compile with many checks: -ghtl -Criot -Sa The problem is probably in some package you installed. Well, I tried with all packages (except the LCL and FCL)) as well with my application compiled with those options, and while I found a couple of (intentional) range exceptions, I could find nothing else :-( Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es Tel. +34 935883004 (Ext.133) Fax +34 935883007 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Latest trunk IDE can't rebuild itself from menu
Hi, I just tested another bug report by using the latest Lazarus from Trunk. I built the IDE using FPC 2.4.3 (latest) via the command line: make bigide The IDE built without problems. I now noticed that if I go to Tools Configure 'build lazarus' and click on the Build button nothing happens. :-/ No compiling is started, no messages appear in the Messages window etc... Same thing happens if I select Tools Build Lazarus. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Latest trunk IDE can't rebuild itself from menu
Just for interest sake, I'm using Lazarus 0.9.31 r28160 FPC 2.4.3 x86_64-linux-gtk 2. I tried something else... I selected Package Install/Uninstall package, made some changes and selected Save and rebuild IDE, and that worked fine. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] dtm_maker project compile errors with TList code.
Hi All, I have copied the relevant unit to pastebin.com and here it is: http://pastebin.com/2v4xw4ep unit1.pas(191,18) Error: No member is provided to access propertyunit1.pas(192,21) Error: No member is provided to access propertyunit1.pas(193,20) Error: No member is provided to access propertyunit1.pas(194,10) Error: No member is provided to access propertyunit1.pas(195,10) Error: No member is provided to access propertyunit1.pas(196,24) Error: No member is provided to access propertyunit1.pas(197,14) Error: No member is provided to access property line 191 follows:constructor TIsland.Create(const ATerrain : Terrain_type; const ATerrain_char : char; const Adescription : description_type; const Ax, Ay, Alocation_number : integer; const Aexits : exit_type );begin // Save the passed parameters self.Terrain := ATerrain; self.Terrain_char := ATerrain_char; self.description := Adescription; self.x := Ax; self.y := Ay; self.location_number := Alocation_number; self.exits := Aexits;end; Can anyone see what I am doing wrong here, and how do I fix this? Best Regards,PEW From: pewilliams2...@live.com To: lazarus@lists.lazarus.freepascal.org Date: Fri, 6 May 2011 17:17:36 +1000 Subject: [Lazarus] dtm_maker project compile errors with TList code. Hi All, I have uploaded my project with compile time errors to here: Download link: http://hotfile.com/dl/116917459/8effac0/dtm_maker_002.zip.htmlAnd I am getting these errors: 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 i386unit1.pas(191,18) Error: No member is provided to access propertyunit1.pas(192,21) Error: No member is provided to access propertyunit1.pas(193,20) Error: No member is provided to access propertyunit1.pas(194,10) Error: No member is provided to access propertyunit1.pas(195,10) Error: No member is provided to access propertyunit1.pas(196,24) Error: No member is provided to access propertyunit1.pas(197,14) Error: No member is provided to access propertyCompiling island_maker.lprCompiling unit1.pasCompiling set_max.pasunit1.pas(191,18) Error: No member is provided to access propertyunit1.pas(192,21) Error: No member is provided to access propertyunit1.pas(193,20) Error: No member is provided to access propertyunit1.pas(194,10) Error: No member is provided to access propertyunit1.pas(195,10) Error: No member is provided to access propertyunit1.pas(196,24) Error: No member is provided to access propertyunit1.pas(197,14) Error: No member is provided to access propertyunit1.pas(498,37) Error: Incompatible type for arg no. 3: Got Array[1..2] Of AnsiString, expected description_typeunit1.pas(184,21) Hint: Found declaration: constructor TIsland.Create(const Terrain_type,const Char,const description_type,const LongInt,const LongInt,const LongInt,const exit_type);unit1.pas(503,15) Error: Identifier not found myListunit1.pas(521,12) Error: Illegal qualifierunit1.pas(529,14) Warning: range check error while evaluating constantsunit1.pas(540,26) Error: Illegal qualifierunit1.pas(542,17) Error: Illegal qualifierunit1.pas(544,43) Error: Illegal qualifierunit1.pas(545,34) Error: Illegal qualifierunit1.pas(546,34) Error: Illegal qualifierunit1.pas(550,43) Error: Illegal qualifierunit1.pas(559,12) Error: Illegal qualifierunit1.pas(588,63) Error: Incompatible type for arg no. 7: Got Pointer, expected exit_typeunit1.pas(184,21) Hint: Found declaration: constructor TIsland.Create(const Terrain_type,const Char,const description_type,const LongInt,const LongInt,const LongInt,const exit_type);unit1.pas(607) Fatal: There were 18 errors compiling module, stopping These errors relate to me modifying my code to try to use a TList. Could someone please look at my code and see if you can point of my errors and fixes. Best Regards,Peter E WilliamsHobart, Australia -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] dtm_maker project compile errors with TList code.
Your constructor should be something like constructor TIsland.Create(const ATerrain : Terrain_type; const ATerrain_char : char; const Adescription : description_type; const Ax, Ay, Alocation_number : integer; const Aexits : exit_type ); begin // Save the passed parameters self.ATerrain := ATerrain; self.ATerrain_char := ATerrain_char; self.Adescription := Adescription; self.Ax := Ax; self.Ay := Ay; self.Alocation_number := Alocation_number; self.Aexits := Aexits; end; You declared the properties as read only, so assignments are not possible, instead you should make the assignments to the private fields that the properties will read. Luk -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] dtm_maker project compile errors with TList code.
On 06/05/11 11:24, Peter Williams wrote: Hi All, I have copied the relevant unit to pastebin.com and here it is: http://pastebin.com/2v4xw4ep http://pastebin.com/2v4xw4ep unit1.pas(191,18) Error: No member is provided to access property unit1.pas(192,21) Error: No member is provided to access property unit1.pas(193,20) Error: No member is provided to access property unit1.pas(194,10) Error: No member is provided to access property unit1.pas(195,10) Error: No member is provided to access property unit1.pas(196,24) Error: No member is provided to access property unit1.pas(197,14) Error: No member is provided to access property line 191 follows: constructor TIsland.Create(const ATerrain : Terrain_type; const ATerrain_char : char; const Adescription : description_type; const Ax, Ay, Alocation_number : integer; const Aexits : exit_type ); begin // Save the passed parameters self.Terrain := ATerrain; I don't know why this is happening, but your naming scheme is confusing. The function parameters are o.k., but it's common to prefix private variables with F, so rename the private variable ATerrain to FTerrain (hint: use F2 to rename an identifier). Then you can do: FTerrain := ATerrain; etc. Henry -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] dtm_maker project compile errors with TList code.
On 06/05/11 11:50, Luk Vandelaer wrote: You declared the properties as read only, so assignments are not possible, Hehe, of course. Silly me for not noticing this. Henry -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Latest trunk IDE can't rebuild itself from menu
Graeme Geldenhuys kirjoitti perjantai, 6. toukokuuta 2011 12:54:21: Just for interest sake, I'm using Lazarus 0.9.31 r28160 FPC 2.4.3 x86_64-linux-gtk 2. Works here. The latest Lazarus trunk revision is r30581. Your revision is rather old already. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Latest trunk IDE can't rebuild itself from menu
On 06/05/2011 13:54, Juha (gmail) wrote: Works here. The latest Lazarus trunk revision is r30581. Your revision is rather old already. That is strange, because I got a trunk update this morning, and my Lazarus changed from v0.9.29 to v0.9.31, so something was definitely updated. Maybe the revision.inc file wasn't updated during the 'make bigide' build process, so still reflects my previous build number? 'git log' shows I am at r30567, so I guess the 'make bigide' just doesn't update revision.inc - another bug? -- $ git log commit 863bb95c49b2b0d82ed4bcb88d6176b7bdca8140 Author: martin mar...@freepascal.org Date: Fri May 6 08:40:42 2011 + DBG: More error handling. error in step-over / terminate on error git-svn-id: http://svn.freepascal.org/svn/lazarus/trunk@30567 4005530d-fff6-0310-9dd1-cebe43e6787f -- I'll get another trunk update and try again... Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Latest trunk IDE can't rebuild itself from menu
On 06/05/2011 13:54, Juha (gmail) wrote: The latest Lazarus trunk revision is r30581. Your revision is rather old already. OK, 'make bigide' didn't update the revision.inc file. Even though I use the git mirror repository, in the past it used to update to rUnknown, now it just left the old revision number in tact (which I think is worse than the old behaviour). I'm now on: Lazarus 0.9.31 r30584-git FPC 2.4.3 x86_64-linux-gtk 2 I also found the problem. Somewhere during the upgrade from 0.9.29 to 0.9.31 the Configure ide dialog, all the radio buttons were reset to None. Setting the IDE radio button to build fixed the issue. :) PS: Attached is a script for git users so their revision.inc files can be updated as well. A manual execution just before a rebuild will do the trick - at least it's better that reporting the wrong revision. Usage is as follows: $ ./git-svn-getrevision.sh ide/revision.inc Anyway, sorry about the false alarm. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ git-svn-getrevision.sh Description: Bourne shell script -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Latest trunk IDE can't rebuild itself from menu
Graeme Geldenhuys kirjoitti perjantai, 6. toukokuuta 2011 15:34:01: OK, 'make bigide' didn't update the revision.inc file. Even though I use the git mirror repository, in the past it used to update to rUnknown, now it just left the old revision number in tact (which I think is worse than the old behaviour). [...] PS: Attached is a script for git users so their revision.inc files can be updated as well. A manual execution just before a rebuild will do the trick - at least it's better that reporting the wrong revision. Good news for you Graeme! In Tools directory there is svn2revisioninc which you should compile. After that the revision gets updated to correct value also when using a git repo. I am doing it all the time with git-svn link and Lazarus About-box shows the correct revision. :) The change was made by Mario Bonati, issue #18156. The issue report has your comments, too. Regards, Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] dtm_maker project compile errors with TList code.
Hi The new version of unit1.pas is here: http://pastebin.com/vNdNeHQe 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 island_maker.lprCompiling unit1.pasunit1.pas(98,3) Error: Identifier not found Genericunit1.pas(98,3) Error: Error in type definitionunit1.pas(98,3) Fatal: Syntax error, ; expected but identifier TLIST found type map_detail = record FTerrain : Terrain_type; FTerrain_char : char; Fdescription : description_type; Fx, Fy, Flocation_number : integer; Fexits : exit_type; end; // The Island class definition TIsland = Generic// line 98 TList(map_detail);Items = array of map_detail; end; As you can see I am having problems defining a Generic TList. Can someone please point out to me what I'm doing wrong here. Best Regards,PEW Date: Fri, 6 May 2011 11:55:27 +0100 From: henry.verm...@gmail.com To: lazarus@lists.lazarus.freepascal.org Subject: Re: [Lazarus] dtm_maker project compile errors with TList code. On 06/05/11 11:50, Luk Vandelaer wrote: You declared the properties as read only, so assignments are not possible, Hehe, of course. Silly me for not noticing this. Henry -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] dtm_maker project compile errors with TList code.
see the unit fgl for examples of generics. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] dtm_maker project compile errors with TList code.
Hi Mattias, I found the fgl unit. It was just a matter of adding it to the uses clause the using the right click 'find declaration'. Thanks. PEW From: pewilliams2...@live.com To: lazarus@lists.lazarus.freepascal.org Date: Sat, 7 May 2011 01:13:25 +1000 Subject: Re: [Lazarus] dtm_maker project compile errors with TList code. Hi Mattias. Date: Fri, 6 May 2011 17:07:55 +0200 From: nc-gaert...@netcologne.de To: lazarus@lists.lazarus.freepascal.org Subject: Re: [Lazarus] dtm_maker project compile errors with TList code. see the unit fgl for examples of generics. Without meaning to ask the obvious question, where can I find the 'fgl' unit ? Please quote the path or url for it. I used the find command on my Linux system and it was not found. I have a Lazarus folder in my home folder. PEW Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Error: Generics without specialization cannot be used as a type for a variable
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 island_maker.lprCompiling unit1.pasunit1.pas(144,19) Error: Generics without specialization cannot be used as a type for a variableunit1.pas(152,1) Fatal: There were 1 errors compiling module, stopping http://62.166.198.202/bug_view_advanced_page.php?bug_id=18101 (0043710) Florian Klämpfl (administrator) 2010-11-29 10:47 Please use always the latest release compiler (2.4.2) as starting compiler to build a new fpc. NB - I am using FPC 2.4.2. type Terrain_type = (Land, Sea); exit_type = array[ directions ] of integer; description_type = array[1..2] of string; Tmap_detail = Object FTerrain : Terrain_type; FTerrain_char : char; Fdescription : description_type; Fx, Fy, Flocation_number : integer; Fexits : exit_type; end; // The Island class definition Generic TIslandT = class Items : array of Tmap_detail;publicconstructor Create(AList: TList);: [Lazarus] dtm_maker project compile errors with TList code.procedure Add( Value : Tmap_detail ); end;var Form1: TForm1; Island : TIsland; // line 144 Unit1.pas http://pastebin.com/wuEft4Kb Best Regards,PEW From: pewilliams2...@live.com To: lazarus@lists.lazarus.freepascal.org Date: Sat, 7 May 2011 01:17:39 +1000 Subject: Re: [Lazarus] dtm_maker project compile errors with TList code. Hi Mattias, I found the fgl unit. It was just a matter of adding it to the uses clause the using the right click 'find declaration'. Thanks. PEW From: pewilliams2...@live.com To: lazarus@lists.lazarus.freepascal.org Date: Sat, 7 May 2011 01:13:25 +1000 Subject: Re: [Lazarus] dtm_maker project compile errors with TList code. Hi Mattias. Date: Fri, 6 May 2011 17:07:55 +0200 From: nc-gaert...@netcologne.de To: lazarus@lists.lazarus.freepascal.org Subject: Re: [Lazarus] dtm_maker project compile errors with TList code. see the unit fgl for examples of generics. Without meaning to ask the obvious question, where can I find the 'fgl' unit ? Please quote the path or url for it. I used the find command on my Linux system and it was not found. I have a Lazarus folder in my home folder. PEW Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
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, 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 OS: Linux for i386 Compiling island_maker.lpr Compiling unit1.pas unit1.pas(144,19) Error: Generics without specialization cannot be used as a type for a variable unit1.pas(152,1) Fatal: There were 1 errors compiling module, stopping http://62.166.198.202/bug_view_advanced_page.php?bug_id=18101 (0043710) Florian Klämpfl (administrator) 2010-11-29 10:47 Please use always the latest release compiler (2.4.2) as starting compiler to build a new fpc. NB - I am using FPC 2.4.2. type Terrain_type = (Land, Sea); exit_type = array[ directions ] of integer; description_type = array[1..2] of string; Tmap_detail = Object FTerrain : Terrain_type; FTerrain_char : char; Fdescription : description_type; Fx, Fy, Flocation_number : integer; Fexits : exit_type; end; // The Island class definition Generic TIslandT = class Items : array of Tmap_detail; public constructor Create(AList: TList);: [Lazarus] dtm_maker project compile errors with TList code. procedure Add( Value : Tmap_detail ); end; var Form1: TForm1; Island : TIsland; // line 144 Unit1.pas http://pastebin.com/wuEft4Kb Why do you declare TIsland as a generic if you don't use the type T anywhere? Nevertheless, you need to declare a specialized type of a generic, so you're able to use it. Example: type TIntegerIsland = specialize TIslandInteger; var Island: TIntegerIsland; (...) Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] OT : Wanted demo to generate and walk through a 2D in 3D simple graphics.
Hi, Apologies in advance for this off topic message. I am looking for a demo in Pascal / Delphi / Lazarus (* preferred) of generating a 2D maze and letting the user walk through the maze in simple 3D graphics with lines (e.g. not ASCII) but using graphics. For example, looking down a corridor it would be drawn as single point perspective with a square and diagonal lines from the corners. I have found a pascal demo of something similar on the web, but in reality it is mostly assembler for TP7. The ASM code is unreadable and undocumented and I also want pure pascal code so that it is portable. Does anyone here have any code that does this? Maybe you have written a demo like this in the past, or know of one. Best Regards,Peter WilliamsHobart, Australia -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus