Re: RE : [fpc-pascal] Re: Variant vs Pointer

2012-03-03 Thread Luiz Americo Pereira Camara
On 3/3/2012 10:08, Marcos Douglas wrote: Think in my class like a Business Object. The struct is very similar with TParams it has many TParam. The data, in a TParam, is save in a Variant type. I need something like: u := TmyBO.Create; // the name does matter u.Attr['name'].Value := 'Marcos'; //

Re: [fpc-pascal] UTF8 JSON library: was: [Lazarus] UTF-8 XML

2012-06-24 Thread Luiz Americo Pereira Camara
Em 24/6/2012 07:58, Reinier Olislagers escreveu: Related: With the help of Ludo Brands - as usual ;) - I've converted the FPC fpjson library to return UTF8 data. I use it for my twitter/Oauthv1 library/program; you can find it incorporated there at https://bitbucket.org/reiniero/fpctwit/src Se

Re: [fpc-pascal] Re: UTF8 JSON library: was: [Lazarus] UTF-8 XML

2012-06-24 Thread Luiz Americo Pereira Camara
Em 24/6/2012 12:22, Reinier Olislagers escreveu: On 24-6-2012 17:05, Luiz Americo Pereira Camara wrote: Hi, Thanks for your work. I plan to look at OAuth library soon No problems, if you have questions, please feel free to ask. I will About fpjson and UTF8, can you post an example

Re: RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Luiz Americo Pereira Camara
Em 10/7/2012 04:32, Ludo Brands escreveu: Following up on bug 22310 http://bugs.freepascal.org/view.php?id=22310 I enabled the use of UTF8 in the FPC JSON support. The constructors of the JSON parser/scanner now accept an extra argument UseUTF8 which tells them to convert JSON strings to UTF8,

Re: RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Luiz Americo Pereira Camara
Em 10/7/2012 04:59, Michael Van Canneyt escreveu: On Tue, 10 Jul 2012, Ludo Brands wrote: Following up on bug 22310 http://bugs.freepascal.org/view.php?id=22310 I enabled the use of UTF8 in the FPC JSON support. The constructors of the JSON parser/scanner now accept an extra argument UseUTF

Re: RE : [fpc-pascal] JSON and UTF8

2012-07-11 Thread Luiz Americo Pereira Camara
Em 10/7/2012 23:19, waldo kitty escreveu: On 7/10/2012 07:00, Luiz Americo Pereira Camara wrote: With the old behavior, in an system with a system code page <> UTF8, if i try to show the parsed value of "\u4E01" in e.g. a LCL app will get garbage. I would expect to work

fpc-pascal@lists.freepascal.org

2012-07-22 Thread Luiz Americo Pereira Camara
Em 22/7/2012 18:49, leledumbo escreveu: It's indeed nginx fastcgi configuration issue, I've managed to make it work somehow by reading its documentation. Thanks :) Can you post your config here so we can also learn how to configure nginx? Luiz _

fpc-pascal@lists.freepascal.org

2012-07-22 Thread Luiz Americo Pereira Camara
Em 22/7/2012 21:46, leledumbo escreveu: Basically I just have to add this: http://wiki.nginx.org/HttpFastcgiModule#fastcgi_split_path_info location / { fastcgi_split_path_info ^((?U).+www.tkd1depok.org)(/?.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcg

Re: [fpc-pascal] Dynamic messaging in Delphi

2012-07-24 Thread Luiz Americo Pereira Camara
Em 24/7/2012 11:13, Ryan Joseph escreveu: I was asking on the Mac Pascal list if Delphi had any ways to invoke methods on objects which the class was unknown at compile time (like a class that invokes a user defined delegate commonly used in Cocoa Mac programming and I assume Delphi not knowin

Re: [fpc-pascal] Dynamic messaging in Delphi

2012-07-24 Thread Luiz Americo Pereira Camara
interface ['myintf'] procedure DoThis (value: integer); end; if delegate.GetInterface('myintf', intfDelegate) then intfDelegate.DoThis Luiz Thanks. On Jul 24, 2012, at 4:26 PM, Luiz Americo Pereira Camara wrote: if delegate.GetInterface(IM

[fpc-pascal] Help translate .SAVENV x86-64 assembly directive

2012-10-01 Thread luiz americo pereira camara
Hi, I'm translating porting a Delphi component that uses x86-64 assembly. So far, most of the asm code compiles and works fine. The only thing that i could not translate is the .SAVENV directive. See http://blogs.embarcadero.com/abauer/2011/10/10/38940 and http://docwiki.embarcadero.com/RADStudi

Re: [fpc-pascal] Editing XMP data in images

2012-10-01 Thread luiz americo pereira camara
2012/10/1 Mattias Gaertner > Hi, > > I need to edit XMP data in images (at least tif, jpg). > > Maybe someone has already done it and can give me a hint? > This? https://delphihaven.wordpress.com/ccr-exif/ Luiz ___ fpc-pascal maillist - fpc-pascal@

[fpc-pascal] Requirement of {$M+} to add RTTI info

2012-12-11 Thread luiz americo pereira camara
Some time ago, i was getting an error while trying to use RTTI functions in a class descending directly of TObject Later i discovered that i needed to descend from TPersistent due to $M+ directive (http://www.freepascal.org/docs-html/prog/progsu44.html), so i did. Now, i decided to go back and de

Re: [fpc-pascal] Requirement of {$M+} to add RTTI info

2012-12-12 Thread luiz americo pereira camara
2012/12/12 Sven Barth : > Am 12.12.2012 01:15 schrieb "luiz americo pereira camara" > : > > >> >> Some time ago, i was getting an error while trying to use RTTI >> functions in a class descending directly of TObject >> >> Later i discovered th

Re: [fpc-pascal] Strings - suggestions

2012-12-22 Thread luiz americo pereira camara
Em 22/12/2012 09:55, "Michael Van Canneyt" escreveu: > > > > Because of the requirement for backwards compatibility with FPC itself, we'll make 2 RTLs: one backwards compatible, one with the new unicode string. > It will be possible to compile a utf8 rtl? There will be a RtlString ? Luiz > > _

Re: [fpc-pascal] FPJSON and float values.

2013-02-28 Thread luiz americo pereira camara
2013/2/28 Michael Van Canneyt : > > > On Thu, 28 Feb 2013, silvioprog wrote: > >> Hello, >> Please see: >> >> http://bugs.freepascal.org/view.php?id=23970 > > > Fixed. Seems that you committed by accident code to make AsJSON output more compact. This may lead to compatibility problems. Luiz ___

Re: [fpc-pascal] File Association and opening with already running app

2013-04-05 Thread luiz americo pereira camara
2013/4/5 Graeme Geldenhuys : > On 2013-04-04 16:34, Dennis wrote: >> In windows, you can create Mutex. That's how I ensure no other instance >> of the same program is running. > > > Yes I know that bit, and that is what I did for my old VB6 and Delphi 5 > projects. The question here was not only ab

[fpc-pascal] Difference between fpc 2.6.2 rc1 and fpc 2.6.2 final

2013-04-11 Thread luiz americo pereira camara
Somehow i missed the final release of 2.6.2 So i'm still using fpc 2.6.2rc1 Are there any difference between those two versions? Luiz ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Difference between fpc 2.6.2 rc1 and fpc 2.6.2 final

2013-04-11 Thread luiz americo pereira camara
2013/4/11 Jonas Maebe : > > On 11 Apr 2013, at 13:18, luiz americo pereira camara wrote: > Are there any difference between those two versions? > > > Yes, all commits later than r22844 in > svn log http://svn.freepascal.org/svn/fpc/tags/release_2_6_2

Re: [fpc-pascal] Placing binary data (resources) in object files?

2013-06-04 Thread luiz americo pereira camara
2013/6/4 Anthony Walter : > I came with a nice solution to all this and thought I'd share... > > I wrote a tool named makeres. Is it open source? Luiz ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listin

Re: [fpc-pascal] How to use generics and meta class?

2014-02-27 Thread luiz americo pereira camara
2014-02-27 18:43 GMT-03:00 Joao Morais : > Correct. The feature I was talking about is something like: > > generic TMyGeneric > > And TMyType is a class. In this case the compiler knows I am talking about > a generic for a class type and a "generic as Java" becomes possible. Seems that you are

[fpc-pascal] Generate RTF file with UTF-8 encoded data

2009-12-09 Thread Luiz Americo Pereira Camara
I need to create a RTF file from UTF-8 encoded strings. Does someone has an example on how to save UTF-8 strings in a RTF file? Luiz ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] sql server embedded: sqlite the only solution?

2009-12-22 Thread Luiz Americo Pereira Camara
JoshyFun escreveu: Hello FPC-Pascal, Tuesday, December 22, 2009, 12:55:07 AM, you wrote: ZD> I think you talk about Firebird embedded version 1.0, SQlite3 best than it ZD> I have Point of Sale application use Firebird 2.1 in desktop PC and ZD> Sqlite3 in Wince, the same project with same SQL st

Re: [fpc-pascal] sql server embedded: sqlite the only solution?

2009-12-22 Thread Luiz Americo Pereira Camara
Michael Van Canneyt escreveu: On Tue, 22 Dec 2009, JoshyFun wrote: SQLite is faster than Firebird, but take care that SQLite does not enforce foreign keys, so data integrity must be handled by the programmer "manually". About the "sqlite is faster": This depends highly on the kind of quer

Re: [fpc-pascal] CLX is returning to Delphi 2011

2010-04-07 Thread Luiz Americo Pereira Camara
Marco van de Voort escreveu: In our previous episode, dmitry boyarintsev said: Does Embarcadero offer 2 different way of cross-platform development. Delphi Prism (XDelphi?) with its Mono .Net based development and Does Prism explicitely target Mono, or is it merely possible to DIY?

[fpc-pascal] Apple forbids fpc applications on iPhone

2010-04-09 Thread Luiz Americo Pereira Camara
According to http://daringfireball.net/2010/04/iphone_agreement_bans_flash_compiler , in the new SDK programs compiled with fpc are not allowed anymore. A quote "Applications must be originally written in Objective-C, C, C++" Luiz ___ fpc-pascal mail

Re: [fpc-pascal] XML Iteration

2010-04-27 Thread Luiz Americo Pereira Camara
Frank Church escreveu: I am glad to see someone with an interest in FPCs XML. Do you have some experience with XPath usage in PFC/Lazarus? In this program: http://www.silvioprog.com.br/downloads/Cliente_SOAP_SAH.zip?attredirects=0&d=1 you can find a simple usage of XPath + WST Luiz

Re: [fpc-pascal] XML Iteration

2010-04-27 Thread Luiz Americo Pereira Camara
Frank Church escreveu: Thanks for the link. What is WST? My searches turn up something related to eclipse. Web Services Toolkit: http://wiki.lazarus.freepascal.org/Web_Service_Toolkit Luiz ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.o

Re: [fpc-pascal] How to convert ISO format string in FreePascal

2010-04-27 Thread Luiz Americo Pereira Camara
Frank Church escreveu: I want to convert a time stamp in -mm-dd hh:mm:ss format to a TDatetime in FPC but can't find but haven't found a way yet. A very simple function i use: function XMLDateTime2DateTime(const XMLDateTime: String): TDateTime; var DateOnly: String; TPos: Integer; begin

Re: [fpc-pascal] XML Iteration

2010-04-28 Thread Luiz Americo Pereira Camara
Lee Jenkins escreveu: Luiz Americo Pereira Camara wrote: Frank Church escreveu: I am glad to see someone with an interest in FPCs XML. Do you have some experience with XPath usage in PFC/Lazarus? Luiz, In Unit1.pas: XPathResult := EvaluateXPathExpression('//Desc

Re: [fpc-pascal] FPC + 64bit Windows => anybody?

2010-05-04 Thread Luiz Americo Pereira Camara
Lukas Gradl escreveu: Thanks. BTW: are you using the latest DCPCrypt? Recently I applied a lot of 64-bit fixes for DCPCrypt - extensively tested under 64-bit Linux. Once I get a 64-bit Windows FPC going, I'll test on that platform too. Latest DCPCrypt is in Lazarus-CCR git repository at SourceF

Re: [fpc-pascal] XML Iteration

2010-05-04 Thread Luiz Americo Pereira Camara
Lee Jenkins escreveu: Frank Church wrote: I am having some problems with XPath. EvaluateXPathExpression raises exceptions with some search strings and I am not sure if it is my limited knowledge of XPath, or a buggy XPath implementation. The attached demo uses the example from http://www.w

Re: [fpc-pascal] VirtualTreeview Mac (Carbon)

2010-05-31 Thread Luiz Americo Pereira Camara
CA Gorski escreveu: Has anybody tried to compile the new VT port which requires lclextensions (Luipack) on Mac OS with target widget Carbon? It's a know issue. See http://forum.lazarus.freepascal.org/index.php/topic,8601.0.html I don't have a mac, so i need patches. I did and wasn't succes

Re: [fpc-pascal] VirtualTreeview Mac (Carbon)

2010-05-31 Thread Luiz Americo Pereira Camara
CA Gorski escreveu: or should one change the later (VT) to use FCL/LCL functions so that it does not rely on Windows functions anymore? Later Why later and not immediately? It's a lot of work. It's easier to maintain sync with Delphi version Lazarus/LCL has added most of the needed funct

Re: [fpc-pascal] VirtualTreeview Mac (Carbon)

2010-06-01 Thread Luiz Americo Pereira Camara
CA Gorski escreveu: Lazarus/LCL has added most of the needed functions, but it's not released yet. I am using the daily snapshot anyway. Are they in there? Yes And if so, what is to do? Remove the dependencies on lclextensions from your port? Yes Luiz

Re: [fpc-pascal] VirtualTreeview Mac (Carbon)

2010-06-01 Thread Luiz Americo Pereira Camara
CA Gorski escreveu: And if so, what is to do? Remove the dependencies on lclextensions from your port? Yes Ok, I will try... Meantime I tried to compile lclextensions against gtk2 What messages do you get when compile lclextensions for carbon? I ask that so i can add the missing functi

Re: [fpc-pascal] Mozilla XPCOM

2010-06-07 Thread Luiz Americo Pereira Camara
Marcos Douglas escreveu: Well... just to I will know. A long time ago (Delphi 4) I learned: Always use 'const' for 'strings' because this is faster. Strings will be passed by reference. This remains true? eg: var str: string; procedure Foo1(const s: string); procedure Foo2(s: string); Ta

Re: [fpc-pascal] Mozilla XPCOM

2010-06-08 Thread Luiz Americo Pereira Camara
Marcos Douglas escreveu: Hi Luiz, On Mon, Jun 7, 2010 at 10:35 PM, Luiz Americo Pereira Camara wrote: Take a look at http://lazarusroad.blogspot.com/2008/11/effect-of-using-constant-parameter-for.html Then, this continue true how I said in other mail: On Mon, Jun 7, 2010 at 11:59

Re: [fpc-pascal] Mozilla XPCOM

2010-06-08 Thread Luiz Americo Pereira Camara
Marcos Douglas escreveu: On Tue, Jun 8, 2010 at 12:55 PM, Luiz Americo Pereira Camara wrote: Marcos Douglas escreveu: Hi Luiz, On Mon, Jun 7, 2010 at 10:35 PM, Luiz Americo Pereira Camara wrote: Take a look at http://lazarusroad.blogspot.com/2008/11/effect-of-using

[fpc-pascal] FastCGI and FpWeb

2010-07-03 Thread Luiz Americo Pereira Camara
I've created some CGI applications with fpWeb with success. I tried to create a FastCGI application (a simple hello world) but when a request is done the program start, Application.Initialize and Application.Run is called. TCustomWebApplication.HandleRequest (I've monitored OnGetModule) is not

Re: [fpc-pascal] FastCGI and FpWeb

2010-07-03 Thread Luiz Americo Pereira Camara
Michael Van Canneyt escreveu: On Sat, 3 Jul 2010, Luiz Americo Pereira Camara wrote: I've created some CGI applications with fpWeb with success. I tried to create a FastCGI application (a simple hello world) but when a request is done the program start, Application.Initializ

Re: [fpc-pascal] methods of an object to create others objects

2010-07-06 Thread Luiz Americo Pereira Camara
Marcos Douglas escreveu: Better: obj1 := nil; obj2 := nil; Try obj1 := TMyObject.Create; obj2 := TMyObject.Create; obj1.DoSomething1; obj2.DoSomething2; finally obj1.Free; obj2.Free; end; The objectcs are protected. But is boring... :) Everybody codify like that, afraid if resource

Re: [fpc-pascal] fpweb tutorial

2010-07-13 Thread Luiz Americo Pereira Camara
Felipe Monteiro de Carvalho escreveu: Hello, Does anyone know where I can find documentation or a tutorial about fpweb? http://blog.silvioprog.com.br/2010/06/criando-um-aplicativo-cgi-com_27.html It's in portuguese Luiz Also, is the version included in FPC 2.4.0 very old and I should rea

[fpc-pascal] How to set a CORBA interface property (tkInterfaceRaw) through RTTI

2010-07-20 Thread Luiz Americo Pereira Camara
Hi, I've managed to set a COM interface property (tkInterface) through RTTI using SetInterfaceProp. But i could not find a way to set a CORBA interface property (tkInterfaceRaw) since SetInterfaceProp expects IUnknown. In the attached example, when i try to use SetInterfaceProp i get the m

Re: [fpc-pascal] How to set a CORBA interface property (tkInterfaceRaw) through RTTI

2010-07-21 Thread Luiz Americo Pereira Camara
Luiz Americo Pereira Camara escreveu: Hi, I've managed to set a COM interface property (tkInterface) through RTTI using SetInterfaceProp. But i could not find a way to set a CORBA interface property (tkInterfaceRaw) since SetInterfaceProp expects IUnknown. In the attached example, w

[fpc-pascal] A check before setting a property (or the cost of a call instruction)

2010-07-22 Thread Luiz Americo Pereira Camara
Hi, In Lazarus i just committed the following code: if Alignment <> FDataLink.Field.Alignment then Alignment := FDataLink.Field.Alignment; but i could do also: Alignment := FDataLink.Field.Alignment; The setter property of Alignment already checks if the passed value is equal: p

[fpc-pascal] How to download fpc242 rc1 (to test a possible bug)

2010-09-12 Thread Luiz Americo Pereira Camara
Hi, I noticed that there's a folder for fpc242 rc1 in ftp://ftp.freepascal.org/pub/fpc/beta/ Trying to access gives an error 550 The reason to get the 242 version is to test an bug reported by a user of the fpc243 snapshot provided at http://www.hu.freepascal.org/lazarus/ Basically it woul

Re: [fpc-pascal] How to download fpc242 rc1 (to test a possible bug)

2010-09-12 Thread Luiz Americo Pereira Camara
Marco van de Voort escreveu: In our previous episode, Luiz Americo Pereira Camara said: I noticed that there's a folder for fpc242 rc1 in ftp://ftp.freepascal.org/pub/fpc/beta/ Trying to access gives an error 550 The reason to get the 242 version is to test an bug reported by a use

Re: [fpc-pascal] How to download fpc242 rc1 (to test a possible bug)

2010-09-13 Thread Luiz Americo Pereira Camara
Marco van de Voort escreveu: In our previous episode, Luiz Americo Pereira Camara said: And it did compile with 2.4.0? Yes. Also with 251 Hmm, I think I know what that is. A wrong merge that should have been reverted. http://bugs.freepascal.org/view.php?id=16121 I'll s

Re: [fpc-pascal] Nesting

2010-09-14 Thread Luiz Americo Pereira Camara
Juha Manninen (gmail) escreveu: A new Lazarus review : http://delphimax.wordpress.com/2010/09/13/freepascal-and-lazarus-success-or- failure/ has this comment about Lazarus source: --- Abundant use of the Exit() command instead of nesting code in If/then/else. It has been proven (last time in De

Re: [fpc-pascal] IntList

2010-10-19 Thread Luiz Americo Pereira Camara
Juha Manninen (gmail) escreveu: Hi In Lazarus project jcf2 component has an IntList class which is poorly implemented. It depends on integer and pointer being the same size. I will later suggest to replace it. I have a better IntList. See: http://github.com/JuhaManninen/Pascal/blob/master/I

Re: [fpc-pascal] JSON Parser to tree view

2010-10-21 Thread Luiz Americo Pereira Camara
ik escreveu: Hello, I wish to use the JSON parser to create some sort of TreeView of my JSON (it's more then 500 lines of data). Before I'll write such code, do you know of any existed code that does such thing, or at least most of the work ? http://code.google.com/p/luipack/source/browse/t

Re: [fpc-pascal] Classes and class methods

2011-02-10 Thread Luiz Americo Pereira Camara
On 9/2/2011 07:58, Mark Morgan Lloyd wrote: Is it possible to put a class (not an instance) in a variable or array element, and to use this to call a class method? I'm defining a hierarchy of classes and it would be convenient if it were possible to register the fact that a class had a particu

Re: [fpc-pascal] FPImage and GetDataLineStart

2011-04-21 Thread Luiz Americo Pereira Camara
On 21/4/2011 06:41, Marco van de Voort wrote: In our previous episode, Sven Barth said: Am 20.04.2011 22:20, schrieb Leonardo M. Ram?: Hi, I need to write a function that replaces TLazIntfImage by using fpImage, and I can't find an alternative to GetDataLineStart. How can I replace it?. Maybe

Re: [fpc-pascal] Minimal Sylpheed plugin in FreePascal

2011-05-17 Thread Luiz Americo Pereira Camara
On 17/5/2011 17:03, Anton Shepelev wrote: Jonas Maebe: One likely potential cause is the fact that released FPC versions enable all floating point exceptions. Since libc does not do that, many C programs and frameworks contain invalid floating point operations. Is masking such exception

Re: [fpc-pascal] fpWeb REST support (asking about features)

2011-06-07 Thread Luiz Americo Pereira Camara
On 7/6/2011 04:22, ik wrote: Hello, One of the thing that I find really missing in fpWeb is the ability to have support for REST. That is, to place different callbacks to GET, POST, UPDATE, DELETE, HEAD and PUT. Let's say that I create a support for the following PATH_INFO: I started som

Re: [fpc-pascal] Free Pascal 2.6.0rc1 released

2011-11-05 Thread Luiz Americo Pereira Camara
On 5/11/2011 20:27, Marco van de Voort wrote: Downloads are available at the FTP server at: ftp://freepascal.stack.nl/pub/fpc/beta/2.6.0-rc1/ Cant download 550 /pub/fpc/beta/2.6.0-rc1/: Permission denied. Luiz ___ fpc-pascal maillist - fpc-pasca

Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-11-07 Thread Luiz Americo Pereira Camara
On 7/11/2011 07:28, Martin Schreiber wrote: > One reason is to make it easy for FPC users to reuse existing Delphi > code that is out there without having to rewrite it in an "FPC- > compatible way". > Is there a big demand? Examples? I speak only for myself. This is a component that i'd

Re: [fpc-pascal] Class reference doubt

2011-11-23 Thread Luiz Americo Pereira Camara
On 23/11/2011 18:48, Jesus Reyes wrote: in the following example The output is: cls class is TFoo TObj.create where I would expect: cls class is TFoo TObj.create TFoo.create I also hit this problem recently Found that this is one limitation of fpc. Under newer delphi it's possible to get the

Re: [fpc-pascal] Class reference doubt

2011-11-24 Thread Luiz Americo Pereira Camara
On 24/11/2011 08:02, Jonas Maebe wrote: On 24 Nov 2011, at 02:58, Luiz Americo Pereira Camara wrote: On 23/11/2011 18:48, Jesus Reyes wrote: in the following example The output is: cls class is TFoo TObj.create where I would expect: cls class is TFoo TObj.create TFoo.create I also hit

Re: [fpc-pascal] Class reference doubt

2011-11-24 Thread Luiz Americo Pereira Camara
On 24/11/2011 05:47, Graeme Geldenhuys wrote: On 2011-11-24 03:58, Luiz Americo Pereira Camara wrote: possible to get the expected behavior without forcing programmer to create a virtual constructor by using the new RTTI What has the "new RTTI" got to do with anything? Sim

Re: [fpc-pascal] Class reference doubt

2011-11-24 Thread Luiz Americo Pereira Camara
On 24/11/2011 19:34, Jonas Maebe wrote: In that case, you did not hit the same problem as the original poster (your "I also hit this problem recently" is what triggered my response). His problem was that if you call a non-virtual constructor on a class reference variable, that the constructor i

Re: [fpc-pascal] Class reference doubt

2011-11-25 Thread Luiz Americo Pereira Camara
On 25/11/2011 07:50, Dimitri Smits wrote: so you have: type TMyObject=class(TObject) ... constructor Create; end; Yes TMyClass = class of TMyObject; //<-- important I guess Not important or necessary. I was using TClass from RTL = class of TObject ... procedure pr

[fpc-pascal] Db2 pascal binding

2006-02-01 Thread Luiz Americo Pereira Camara
Does someone knows open source delphi or pascal bindings to access db2? Any TDataset implementation?. It would be useful since IBM released a free version of this database. Having a delphi base would make the work smaller. Luiz ___ fpc-pascal maillis

Re: [fpc-pascal] Cross Platform Save/Restore Screen

2006-06-21 Thread Luiz Americo Pereira Camara
Michael Preslar wrote: Back in the DOS Turbo Pascal days I could do the following type screentype= array[1..4000] of byte; screenptr=^screentype; var screen1: screenptr; procedure savescreen(scr:byte); var sc1: byte absolute $b000:0; sc2: byte absolute $b800:0; begin; if screenaddress=$b0

Re: [fpc-pascal] Source line numbers during execution

2006-07-10 Thread Luiz Americo Pereira Camara
Arí Ricardo Ody escreveu: I've tried to make programs generated by FPC inform the line number or exceptions in execution time and I can't. I use fpc.cfg standard installed during Lazarus 0.9.16 installation and I put -CX -XX -gl after the name of the source in the FPC compilation. May someo

Re: [fpc-pascal] Source line numbers during execution

2006-07-10 Thread Luiz Americo Pereira Camara
Ubuntu Dapper Drake. The only issues i am having are related in Know Issues section. Luiz Regards, Graeme. On 7/10/06, Luiz Americo Pereira Camara <[EMAIL PROTECTED]> wrote: You can try MultiLog. I has a SendCallStack function that sends the current call stack (when compiled with -gl

Re: [fpc-pascal] Question on how to avoid memory trouble using FindFirst(), FindNext() and FindClose()

2007-02-03 Thread Luiz Americo Pereira Camara
Michael Van Canneyt wrote: All this doesn't exclude that a specialized class may be more suitable for the job. To be honest, the only good point of TStringList seems to be that it is default available on all Object Pascal. The specialised stuff (splitting strings) is also plagued with odd

Re: [fpc-pascal] Exception callstacks, backtracks...

2007-02-07 Thread Luiz Americo Pereira Camara
Vincent Snijders wrote: m utku schreef: Hi all, Basically I want to get a stack trace and log it when a special exception occurs. All I could find about was the lineinfo.pas (and -gl switch) but that does not help much as it interfaces only one procedure which is no good for client usage. Wh

[fpc-pascal] Function to set high and low Dword of a QWord

2007-02-28 Thread Luiz Americo Pereira Camara
Hi, I'm looking to a function that will take two DWord as arguments and and returns a Qword where the low 4 bytes are the first DWord and the High 4 bytes the second DWord. Something like MakeLong of win unit. BTW TQWordRec = record D1: Dword; D2: DWord; end; TQWordRec will have t

[fpc-pascal] Function to set high and low Dword of a QWord

2007-02-28 Thread Luiz Americo Pereira Camara
Hi, I'm looking to a function that will take two DWord as arguments and and returns a Qword where the low 4 bytes are the first DWord and the High 4 bytes the second DWord. Something like MakeLong of win unit. BTW TQWordRec = record D1: Dword; D2: DWord; end; TQWordRec will have the

Re: [fpc-pascal] Function to set high and low Dword of a QWord

2007-02-28 Thread Luiz Americo Pereira Camara
Jonas Maebe wrote: On 28 feb 2007, at 17:51, Luiz Americo Pereira Camara wrote: I'm looking to a function that will take two DWord as arguments and and returns a Qword where the low 4 bytes are the first DWord and the High 4 bytes the second DWord. function makeqword(d1, d2: dword):

[fpc-pascal] Behavior of SizeOf function

2007-03-08 Thread Luiz Americo Pereira Camara
The result of a SizeOf(Pointer) is know at compile time. Does fpc optimize it and treat as a constant or will call the SizeOf function every time it appears? Thanks in advance. Luiz ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://l

[fpc-pascal] Value of runner variable after a for loop

2007-03-12 Thread Luiz Americo Pereira Camara
Take the following example: for i:= 0 to 2 do; WriteLn(i); Can i safely assume that after the for loop the value of "i" is 2? Thanks in advance Luiz ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/lis

Re: [fpc-pascal] Value of runner variable after a for loop

2007-03-12 Thread Luiz Americo Pereira Camara
Jonas Maebe wrote: On 12 mrt 2007, at 16:19, Flávio Etrusco wrote: And unless the compiler (programmer) use an extra variable just to attain this behaviour, the value after the loop will 3 (i.e. end value +1). No, it can be anything, and the actual value even depends on the compiler version

[fpc-pascal] Fpc running in Zeta?

2007-03-27 Thread Luiz Americo Pereira Camara
The Pixel editor, which is compiled with fpc AFAIK, is available to Zeta OS. Does fpc runs in Zeta? (Or maybe he is using another compiler?) Someone has info about this? Luiz ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.fr

[fpc-pascal] Usage of TInterfacedObject. Automatic release?

2007-05-26 Thread Luiz Americo Pereira Camara
I'm tracing a memory leak in a Delphi ported component and found that the culprit was a TInterfacedObject descendant that was not being freed. I found that if i directly call Free or _Release the memory leak vanishes (Delphi code does not call these). My question is: is TInterfacedObject des

Re: [fpc-pascal] Usage of TInterfacedObject. Automatic release?

2007-05-26 Thread Luiz Americo Pereira Camara
Cesar Romero wrote: var Manager: TVTDragManager; It should be Interface. like var Manager: IDropSource; or other implemented interface Thanks. You are right. Using Manager as IDropSource there's no leak in the test program. Unfortunately in the original code Manager is already an interfa

Re: [fpc-pascal] Usage of TInterfacedObject. Automatic release?

2007-05-26 Thread Luiz Americo Pereira Camara
Joao Morais wrote: Luiz Americo Pereira Camara wrote: Unfortunately in the original code Manager is already an interface but still leaking memory. It seems that is a more complex bug. If you have two or more interfaces whose members point each other in a circular reference scenario, without

Re: [fpc-pascal] Usage of TInterfacedObject. Automatic release?

2007-05-26 Thread Luiz Americo Pereira Camara
Cesar Romero wrote: Luiz Americo, Anyway, calling manually _Release avoid the leak and i will stay with it for now (I hope did not break anything). It can work for that case, but I think that is not a good ideia. If you are using a TInterfacedObject descendant, it will call the _Release when

Re: [fpc-pascal] Usage of TInterfacedObject. Automatic release?

2007-05-26 Thread Luiz Americo Pereira Camara
Cesar Romero wrote: Luiz Americo, Anyway, calling manually _Release avoid the leak and i will stay with it for now (I hope did not break anything). It can work for that case, but I think that is not a good ideia. If you are using a TInterfacedObject descendant, it will call the _Release when

Re: [fpc-pascal] Usage of TInterfacedObject. Automatic release?

2007-05-27 Thread Luiz Americo Pereira Camara
Graeme Geldenhuys wrote: The virtual treeview has already been ported twice by two different people. Any particular reason you are doing it again? See the link for one of the ports... http://tinyurl.com/2uxewm The other one was based on a newer version of VT, but I don't think the port was 100

Re: [fpc-pascal] Usage of TInterfacedObject. Automatic release?

2007-05-27 Thread Luiz Americo Pereira Camara
Marc Weustink wrote: Luiz Americo Pereira Camara wrote: Cesar Romero wrote: Luiz Americo, Anyway, calling manually _Release avoid the leak and i will stay with it for now (I hope did not break anything). It can work for that case, but I think that is not a good ideia. If you are using a

Re: [fpc-pascal] Usage of TInterfacedObject. Automatic release?

2007-05-28 Thread Luiz Americo Pereira Camara
Cesar Romero wrote: Luiz Americo, This was my first idea. And now gains force again. The problem is that the bug can not be isolated easily. Another option is that there's a mem leak in delphi also. Does some one know how to trace a mem leak in delphi? Use FastMM with FullDebugOptions I

[fpc-pascal] Declare a standalone procedure of object (TNotifyEvent)

2007-09-12 Thread Luiz Americo Pereira Camara
I'm trying to declare a standalone function (not attached to a class) to use as a TNotifyEvent. I tried procedure FooBar of object; begin end; Without sucess. Is it possible to declare such function to use as a TNotifyEvent without creating a class only to hold the callback method? Luiz __

Re: [fpc-pascal] Cross-platform single instance

2007-10-02 Thread Luiz Americo Pereira Camara
Vincent Snijders wrote: Felipe Monteiro de Carvalho schreef: Hello, I was looking into a way to detect if an instance of my application is running. Is there a cross-platform solution on rtl or fcl? It seams that semaphores would be a good solution. I took a look at pthreads and PSemaphore but

Re: [fpc-pascal] Cross-platform single instance

2007-10-03 Thread Luiz Americo Pereira Camara
Luiz Americo Pereira Camara wrote: Vincent Snijders wrote: Have you considered UniqueInstance? http://wiki.lazarus.freepascal.org/UniqueInstance The updated version can be found at https://svn.bountysource.com/luipack/trunk/uniqueinstance I released a new version. Look in http

[fpc-pascal] Trouble converting to pascal sample examples of cairo

2007-10-19 Thread Luiz Americo Pereira Camara
I'm converting the cairo samples (http://cairographics.org/samples/ http://cvs.cairographics.org/cairo-demo/cairo_snippets/) to pascal. I'm getting a runtime error 207 (invalid float operation in win32) in two specific examples (arc and arc_negative). All other examples works fine. Here's the

[fpc-pascal] New homepage and documentation for TSqlite3Dataset

2007-12-19 Thread Luiz Americo Pereira Camara
I updated the sqlite4fpc homepage adding documentation and some tutorials. As a bonus i also added some features. See http://www.geocities.com/camara_luiz/ Luiz ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/m

Re: [fpc-pascal] TSqlite3Dataset

2008-01-06 Thread Luiz Americo Pereira Camara
JK Smith at Grid-Sky wrote: Luiz, Good work. How thread safe is your code? I don't have deep knowledge in thread programming so i can't answer that. The only thing i know about thread safe is that is bad to use global variables. TSqlite3Dataset does not uses. If someones knows some flaw

Re: [fpc-pascal] Turbo Pascal and Object Pascal ways of OOP

2008-02-05 Thread Luiz Americo Pereira Camara
Daniël Mantione wrote: [..] Stack allocation is much faster than heap allocation, and automatic. Take a look at the matrix unit; you can return an object from a function without worrying about memory leaks, so they are very usefull in function results and operator overloading. Further, ob

Re: [fpc-pascal] Can you knock my socks off ? Can you mimic Skybuck's/Delphi's Major Breakthrough for code path and memory structure selection ?

2008-02-11 Thread Luiz Americo Pereira Camara
Matt Emson wrote: I don't think this guy actually listens to anything anyone says to him. He always seems, to me, to be speaking to an audience, rather than a discussion list. Adios Sybuck Flying, added you to my ignore list ;-) +1 Luiz ___ fpc-pa

Re: [fpc-pascal] connection problem

2008-03-27 Thread Luiz Americo Pereira Camara
[EMAIL PROTECTED] wrote: I am experiencing similar problems with the www.freepascal.org front page and svn checkout update - both just hang. It is ISP specific - my normal ones work fine, but I am staying away from home this week and my host's ISP won't connect. Colin Hi, I'm experiencing conn

Re: [fpc-pascal] connection problem

2008-03-29 Thread Luiz Americo Pereira Camara
Jonas Maebe wrote: On 27 Mar 2008, at 17:21, Luiz Americo Pereira Camara wrote: Hi, I'm experiencing connection problems to bugs.freepascal.org and svn.freepascal.org. I'm also having problems. The curious is that in my Windows machine the problem occurs but not in my Linux mac

Re: [fpc-pascal] Crash at startup with sqlite project

2008-04-02 Thread Luiz Americo Pereira Camara
Felipe Monteiro de Carvalho wrote: Hello, I have a simple project with sqlite 3. It's running on Windows with FPC 2.2.0 and svn Lazarus, and my DLL is version is 3_5_7 downloaded from official sqlite website. It crashes at startup at sqlite3ds.pas at: The strange part is that Lazarus run

Re: [fpc-pascal] Crash at startup with sqlite project

2008-04-02 Thread Luiz Americo Pereira Camara
Felipe Monteiro de Carvalho wrote: On Wed, Apr 2, 2008 at 7:46 PM, Luiz Americo Pereira Camara <[EMAIL PROTECTED]> wrote: See http://www.geocities.com/camara_luiz/docs/dataset/dataset-tutorial-01.html to know how to setup a db file dinamically Thanks, that was indeed true, a

[fpc-pascal] Constant parameters and double types

2008-04-08 Thread Luiz Americo Pereira Camara
I'm evaluating the effect of passing function parameters by value or by reference. Like stated in the documentation, passing as reference (const) or by value types with size equal to pointer size like Integer has no difference in the code output (they are passed by value). Also as expected i

Re: [fpc-pascal] Constant parameters and double types

2008-04-09 Thread Luiz Americo Pereira Camara
Luiz Americo Pereira Camara wrote: I'm evaluating the effect of passing function parameters by value or by reference. Like stated in the documentation, passing as reference (const) or by value types with size equal to pointer size like Integer has no difference in the code output (the

Re: [fpc-pascal] Pascal postscript reading library

2008-04-23 Thread Luiz Americo Pereira Camara
Felipe Monteiro de Carvalho wrote: On Wed, Apr 23, 2008 at 4:32 AM, Krishna <[EMAIL PROTECTED]> wrote: The drawing will most likely come from CorelDraw. We are developing a printer driver which will then use a ready made virtual printer which is able to generate postscript as output, which will m

Re: [fpc-pascal] {$R file} support on non-Windows targets

2008-07-14 Thread Luiz Americo Pereira Camara
Graeme Geldenhuys wrote: On Sun, Jul 13, 2008 at 11:47 PM, German Gentile <[EMAIL PROTECTED]> wrote: fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ Big OT, your site is not working. I wanna try fpgui on lazarus. They were working on our backu

  1   2   >