Re: [fpc-pascal] Commandline to compile projects with generics

2014-09-22 Thread luciano de souza
Yes, I use 2.6.4 version. Well, the important is that work is being doing and the time will arrive. 2014-09-22 14:05 GMT-03:00, Sven Barth : > Am 22.09.2014 15:53 schrieb "luciano de souza" : >> Yes, it works, but why is it not possible to compile programs with >> generics with the conventional

Re: [fpc-pascal] Commandline to compile projects with generics

2014-09-22 Thread Sven Barth
Am 22.09.2014 15:53 schrieb "luciano de souza" : > Yes, it works, but why is it not possible to compile programs with > generics with the conventional method? You are using a 2.6 series compiler, right? If so then this is likely fixed in 2.7.1, which has vast improvements regarding generics. There

Re: [fpc-pascal] Commandline to compile projects with generics

2014-09-22 Thread luciano de souza
Wonderful! Generics are one of the best things has succeed in Freepascal. I suppose this correction will be available in FPC 2.8. Is there some prevision when it will be launched? A friend took a look at GIT updates and he was very happy with the advances. 2014-09-22 12:51 GMT-03:00, leledumbo : >

Re: [fpc-pascal] Persistent lists to save records

2014-09-22 Thread luciano de souza
Hum... It's a very good idea. Firstly, I thought in something like a persistent list with LoadFromFile and SaveTofile methods, but this approach is really simple and useful. 2014-09-22 13:01 GMT-03:00, leledumbo : >> So my question is: which are the easiest way to save records without this > limit

Re: [fpc-pascal] Persistent lists to save records

2014-09-22 Thread leledumbo
> So my question is: which are the easiest way to save records without this limitation? > Is there something like a persistent list? Not with static data record. That one do only support shortstrings, because it contains actual data. Other strings are just pointers, which will be saved as pointer

Re: [fpc-pascal] Commandline to compile projects with generics

2014-09-22 Thread leledumbo
> Yes, it works, but why is it not possible to compile programs with generics with the conventional method? Compiler bug, which luckily gets fixed by specifying additional compiler options. In normal case, there should be no difference between compiling non-generic and generic code WRT compiler

[fpc-pascal] Persistent lists to save records

2014-09-22 Thread luciano de souza
Hello all, Sometimes, I want only to save a simple file of records. The first approach is record files, handled with reset, read, write and close of CRT unit. However, thereis an important limit. Strings can't exceed 255 characters. The $H switch can't be on. So my question is: which are the eas

[fpc-pascal] Commandline to compile projects with generics

2014-09-22 Thread luciano de souza
Hello all, I don't use Lazarus, but only Freepascal. Untill the generics advent, I used to compile my projects with the following commandline: fpc progname.pp However, using generics, it was common an access violation in compiling time. A friend said that codes with generics sould be compiled wi

Re: [fpc-pascal] Freepascal templating engines with logical structures

2014-09-22 Thread luciano de souza
Thank you. The options you had me done are very intersting. I want to show HTML grids and I intend to use a templating engine for this purpose. But, in stead of embed logics in the template, I think I need to organize better my code. Perhaps, I need to build a class THMLTable where I could set a

Re: [fpc-pascal] TDomNode to text and/or document

2014-09-22 Thread Daniel Gaspary
On Mon, Sep 22, 2014 at 8:21 AM, Felipe Monteiro de Carvalho wrote: > Ummm, this doesn't seam to help much... but I eventually found googling. > > The error is EDOMWrongDocument, which makes sense since I want to > insert a TDOMNode from another document ... so I have to first import > and then at

[fpc-pascal] Lists of tuples

2014-09-22 Thread Mark Morgan Lloyd
Assuming that a tuple is a sequence of fields, accessible by position or name. Assuming that a list of tuples may significantly exceed available primary storage, and that individual tuples are accessed by some variation of First(), Next() etc. As I understand it, this concept is central to the

Re: [fpc-pascal] TDomNode to text and/or document

2014-09-22 Thread Felipe Monteiro de Carvalho
Ummm, this doesn't seam to help much... but I eventually found googling. The error is EDOMWrongDocument, which makes sense since I want to insert a TDOMNode from another document ... so I have to first import and then attach the node: lDoc := TXMLDocument.Create; try lImportedNode := lDoc

Re: [fpc-pascal] TDomNode to text and/or document

2014-09-22 Thread Vojtěch Čihák
Hi,   this is working code:   ... if not assigned(XMLDoc) then XMLDoc:=TXMLDocument.Create;   with XMLDoc do     begin       if not assigned(DocumentElement) then         begin           aNode:=CreateElement(cRoot);           AppendChild(aNode);          end;         if ASchemeNode='' then AScheme

Re: [fpc-pascal] Is is impossible to extend a generic class in fpc 2..6.4?

2014-09-22 Thread Dennis Poon
Sven Barth wrote: generic TMyMap = class(specialize TFPGMap) end; Thanks a lot for your help. Dennis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] TDomNode to text and/or document

2014-09-22 Thread Felipe Monteiro de Carvalho
Hello, I have a TDomNode (laz2_dom, but I guess it should be the same for all implementations). Is it possible to get a TXMLDocument from it? I tried: lDoc := TXMLDocument.Create; try lDoc.AppendChild(ANode); but it crashes =( Is it possible to get the full text of this node? something

Re: [fpc-pascal] Optimal number of threads for SMP

2014-09-22 Thread Michael Schnell
On 09/20/2014 01:48 AM, Graeme Geldenhuys wrote: On 2014-09-15 10:19, Marco van de Voort wrote: My rule of thumb is physical cores + a percentage. (like 10-20%). Tell that to most developers out there, they clearly don't know that "rule of thumb". :-) Mozilla Thunderbird under Win7 shows 47 th

Re: [fpc-pascal] Mapping Cairo pixmap to FPC Bitmap and back

2014-09-22 Thread Giuliano Colla
Thanks a lot. Muito obrigado. Giuliano Il 22/09/2014 02:32, luiz americo pereira camara ha scritto: https://code.google.com/p/luipack/source/browse/trunk/cairo/lcl/cairolcl.pas#152 https://code.google.com/p/luipack/source/browse/trunk/cairo/lcl/include/win32/cairolcl.inc#4 Direct bitmap data