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 -

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 like

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

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? Simply define TObj.Create

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 is

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

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

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

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 correctly in any

Re: [fpc-pascal] Re: Nginx, FastCGI and /module/action vs ?module=moduleaction=action

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

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

Re: [fpc-pascal] Dynamic messaging in Delphi

2012-07-24 Thread Luiz Americo Pereira Camara
['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(IMyInterface, intfDelegate

[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

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

2012-10-01 Thread luiz americo pereira camara
2012/10/1 Mattias Gaertner nc-gaert...@netcologne.de 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

[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

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

2012-12-12 Thread luiz americo pereira camara
2012/12/12 Sven Barth pascaldra...@googlemail.com: Am 12.12.2012 01:15 schrieb luiz americo pereira camara luiz...@oi.com.br: 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

Re: [fpc-pascal] Strings - suggestions

2012-12-22 Thread luiz americo pereira camara
Em 22/12/2012 09:55, Michael Van Canneyt mich...@freepascal.org 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

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

2013-02-28 Thread luiz americo pereira camara
2013/2/28 Michael Van Canneyt mich...@freepascal.org: 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.

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

2013-04-05 Thread luiz americo pereira camara
2013/4/5 Graeme Geldenhuys gra...@geldenhuys.co.uk: 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

[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 jonas.ma...@elis.ugent.be: 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 | less Thanks Luiz

[fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-21 Thread Luiz Americo Pereira Camara
Hi, I'm trying to fix bug http://bugs.freepascal.org/view.php?id=14135 but could not get a way to do case insensitive comparison of UTF8 strings with non ascii characters (in the test even ansi strings failed). See the attached test program. I tried StrIComp, AnsiCompareText, CompareText

Re: [fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-21 Thread Luiz Americo Pereira Camara
JoshyFun escreveu: Hello FPC-Pascal, Tuesday, July 21, 2009, 6:45:03 AM, you wrote: LAPC I'm trying to fix bug LAPC http://bugs.freepascal.org/view.php?id=14135 but LAPC could not get a way to do case insensitive comparison of UTF8 strings LAPC with non ascii characters (in the test even

Re: [fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-22 Thread Luiz Americo Pereira Camara
Luiz Americo Pereira Camara escreveu: JoshyFun escreveu: Hello FPC-Pascal, Tuesday, July 21, 2009, 6:45:03 AM, you wrote: LAPC I'm trying to fix bug LAPC http://bugs.freepascal.org/view.php?id=14135 but LAPC could not get a way to do case insensitive comparison of UTF8 strings LAPC with non

[fpc-pascal] How to get programatically a UTF8 encoded string?

2009-07-22 Thread Luiz Americo Pereira Camara
I tried to get UTF8 encoded strings programatically by doing Key := UTF8Encode('ç'); Str := UTF8Encode('Ç'); but when i test the code below it will fail, unlike when using know UTF8 encoded strings if WideCompareText(UTF8Decode(Key), UTF8Decode(Str)) = 0 then WriteLn('

Re: [fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-25 Thread Luiz Americo Pereira Camara
theo escreveu: @Luiz Americo Your code WideCompareText(UTF8Decode(Key), UTF8Decode(Str)) will work, but if speed matters, then it's rather bad. Hi, i'm aware that the performance is bad although had not tested like you did, but at this point i'd like to stick with a solution that fpc

[fpc-pascal] Status of fpc on Nokia n810

2009-08-21 Thread Luiz Americo Pereira Camara
Hi, Recently, the price of Nokia n810 dropped significantly and i got some interest in it, but before i buy i'd like to know if, currently, is possible to compile programs with fpc to this platform. Is someone using fpc to develop in such devices? Luiz

Re: [fpc-pascal] Status of fpc on Nokia n810

2009-08-22 Thread Luiz Americo Pereira Camara
Jonas Maebe escreveu: http://www.google.com/search?q=nokia+n810hl=en - first hit: http://en.wikipedia.org/wiki/Nokia_N810 - The Nokia N810 features the Maemo Linux distribution Yes. Nokia n810 runs the Maemo platform on top of Linux OS. The maemo platform will be used in the Nokia flagship

Re: [fpc-pascal] Licencing software made in Free Pascal

2009-09-09 Thread Luiz Americo Pereira Camara
wht244 escreveu: So, when I want to use libmysql.dll library - I have to make my application run on a GPL licence. Is that right? And what about sqlite3? Sqlite is public domain. Use as you want Luiz ___ fpc-pascal maillist -

Re: [fpc-pascal] fpc and Sqlite UDF

2009-11-05 Thread Luiz Americo Pereira Camara
Nataraj S Narayan escreveu: Hi Anybody has written custom UDF for Sqlite 3 using fpc? If so kindly help me with some hints to get started. See the attached files. It implements a custom format date function Luiz program testfunction; {$Mode ObjFpc} {$H+} {$define DEBUGHEAP} uses

Re: [fpc-pascal] fpc and Sqlite UDF

2009-11-06 Thread Luiz Americo Pereira Camara
Nataraj S Narayan escreveu: Hi Luiz Getting this:- /software/fpc-uclibc/lib/fpc/2.5.1/ppcrossarm -MObjFPC -TLinux -Parmv5 -gl -Xd -Xs -l -darm -XParm-linux-uclibcgnueabi- -CfSOFT -CaEABI -darm -gl -O- -CpARMV5 -uUSE_LOCALIZE -Fu/software/fpc-arm/units/arm-linux/ testfunction.pas Free Pascal

[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

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 queries

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

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=0d=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 -

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('//Descricao

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

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

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

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

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

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);

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 luiz...@oi.com.br 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

[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

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.Initialize

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

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

[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

[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

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 user

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 see

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

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:

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 ?

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

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?.

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

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

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

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.

[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

[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

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

[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

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

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

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

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

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

[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

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

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,

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 ___

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

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 machine (both

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

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

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

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

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 backup

[fpc-pascal] Delphi Tiburón approach to handle different stri ng encodings

2008-07-21 Thread Luiz Americo Pereira Camara
In the recent discussion about fpc unicode support one of the doubts was the Delphi approach to convert encodings. Maybe this article can help. http://blogs.codegear.com/abauer/2008/07/16/38864/ Luiz ___ fpc-pascal maillist -

Re: [fpc-pascal] simpleipc

2008-10-18 Thread Luiz Americo Pereira Camara
Brad Campbell wrote: G'day all, I've been having a play with simpleipc.pp for trying to do cross-platform single instance detection. Ordinarily it behaves perfectly, but I just noticed on Linux that it all comes crashing down if the server application crashes without removing the pipe. I

Re: [fpc-pascal] helpsystem, some numbers

2008-10-28 Thread Luiz Americo Pereira Camara
Graeme Geldenhuys escreveu: I used Total Command 6.55 with the 7-zip plugin v0.4.6. Total Commander and the 7-zip plugin is written in Object Pascal (delphi). No dependencies on external libraries. I ran Total Commander under Linux by the way. For the latest version of the 7-zip plugin

[fpc-pascal] Lookup/Calculated fields implemented in TSqlite3Dataset

2009-02-21 Thread Luiz Americo Pereira Camara
I implemented Lookup/Calculated fields in TSqlite3Dataset at fpc trunk. If someone is interested in this feature please test and give me the feedback because i don't use these features too much. To make easier to setup the fields a recent Lazarus from svn is recommended (added support to the

[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

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

  1   2   >