Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread Sven Barth
Am 15.03.2014 00:08 schrieb "Fred van Stappen" : > > > Note: if your MyString is valid through the complete lifetime it could > > be used you can also use "Result := PChar(MyString);" > > Hum, to be sure that i understand... > > type > TStringClass = class(TObject) > Name: AnsiString; d

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread Sven Barth
Am 14.03.2014 23:46 schrieb "Fred van Stappen" : > > > Date: Fri, 14 Mar 2014 23:11:14 +0100 > > From: pascaldra...@googlemail.com > > > To: fpc-pascal@lists.freepascal.org > > Subject: Re: [fpc-pascal] Library.StringFunction() : PChar => NO > > > > On 14.03.2014 22:07, Fred van Stappen wrote: > >

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread Fred van Stappen
> Note: if your MyString is valid through the complete lifetime it could > be used you can also use "Result := PChar(MyString);" Hum, to be sure that i understand... type TStringClass = class(TObject) Name: AnsiString; does not change SomeText: AnsiString; / may change.. en

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread Fred van Stappen
> Date: Fri, 14 Mar 2014 23:11:14 +0100 > From: pascaldra...@googlemail.com > To: fpc-pascal@lists.freepascal.org > Subject: Re: [fpc-pascal] Library.StringFunction() : PChar => NO > > On 14.03.2014 22:07, Fred van Stappen wrote: > > > It's not a problem, as long as you provide an API to dispose

Re: [fpc-pascal] Error compile library on Linux.

2014-03-14 Thread Fred van Stappen
Hello. Here are some news from the front : The fpc Library : TheRevolutionaryLibrary library; uses TheBigUnit; begin end. fpc compiler parameter => -fPIC. => Windows 32 bit => Compiles and works more than perfect. => Windows 64 bit => Compiles and works more than perfect. => Linux 32 bit => C

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread Sven Barth
On 14.03.2014 22:07, Fred van Stappen wrote: > It's not a problem, as long as you provide an API to dispose the memory > used by the returned PChar. > The responsibility of calling this API is delegated > to the application. Yep, with pleasure,... but how to provide an API (and what do you m

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread Fred van Stappen
> It's not a problem, as long as you provide an API to dispose the memory > used by the returned PChar. > The responsibility of calling this API is delegated > to the application. Yep, with pleasure,... but how to provide an API (and what do you mean with "provide an API to dispose the memory") ?

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread Fred van Stappen
> Date: Fri, 14 Mar 2014 08:20:46 -0700 > From: leledumbo_c...@yahoo.co.id > To: fpc-pascal@lists.freepascal.org > Subject: Re: [fpc-pascal] Library.StringFunction() : PChar => NO > > > It will be the memory manager of the library who deals with the PChar > result. > So difficult for the main appl

Re: [fpc-pascal] Installer (2.6.4 win32) and path issues

2014-03-14 Thread Marco van de Voort
In our previous episode, Tomas Hajny said: > Are they? > > Anyway - as far as I can see, the usual solution appearing with other > programs on MS Windows is either defaulting new version to the directory > used for the previous one and/or suggestion that you should uninstall the > previous version

Re: [fpc-pascal] Installer (2.6.4 win32) and path issues

2014-03-14 Thread Tomas Hajny
On Fri, March 14, 2014 16:33, Bart wrote: >> As for whether it should ask... well, perhaps, but that does complicate >> things... > > Complications are good. Are they? Anyway - as far as I can see, the usual solution appearing with other programs on MS Windows is either defaulting new version to

Re: [fpc-pascal] TProcess on windows: incompatibility between poUsePipes and InheritHandles:=false

2014-03-14 Thread Luca Olivetti
El 13/03/14 00:21, Luca Olivetti ha escrit: > El 11/03/14 19:43, Luca Olivetti ha escrit: > >>> I have no explicit solution for you, but a few links that I hope can >>> help you further: >>> >>> http://blogs.msdn.com/b/oldnewthing/archive/2011/12/16/10248328.aspx >> >> What surprises me is that it

Re: [fpc-pascal] Installer (2.6.4 win32) and path issues

2014-03-14 Thread Reinier Olislagers
On 14/03/2014 16:33, Bart wrote: > On 3/14/14, Reinier Olislagers wrote: > >> I wouldn't expect the installer to automatically put your new fpc before >> anything else as it can mess up batch scripts that expect certain >> binaries etc (say Delphi make or some special grep). > > Every which way

Re: [fpc-pascal] Installer (2.6.4 win32) and path issues

2014-03-14 Thread Bart
On 3/14/14, Reinier Olislagers wrote: > I wouldn't expect the installer to automatically put your new fpc before > anything else as it can mess up batch scripts that expect certain > binaries etc (say Delphi make or some special grep). Every which way you loose? > As for whether it should ask.

Re: [fpc-pascal] Installer (2.6.4 win32) and path issues

2014-03-14 Thread Reinier Olislagers
On 14/03/2014 14:23, Bart wrote: > I installed 2.6.4 for win32. > I removed the 2.6.4rc1 installation. > After that I wanted to rebuild Lazarus, so I did a "make clean all" in > Lazarus dir, but got only errors. > This was because make was now the make from D7, because the installer > appended the

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread leledumbo
> It will be the memory manager of the library who deals with the PChar result. So difficult for the main application to manage the memory used by PChar. It's not a problem, as long as you provide an API to dispose the memory used by the returned PChar. The responsibility of calling this API is de

[fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread Fred van Stappen
Hello great fpc people. It is about functions dealing with string inside a library... If i use that kind of function inside the library : >> InLibStringFunction() : PChar ; It will be the memory manager of the library who deals with the PChar result. So difficult for the main application to ma

[fpc-pascal] Installer (2.6.4 win32) and path issues

2014-03-14 Thread Bart
Hi, I installed 2.6.4 for win32. I removed the 2.6.4rc1 installation. After that I wanted to rebuild Lazarus, so I did a "make clean all" in Lazarus dir, but got only errors. This was because make was now the make from D7, because the installer appended the path to fpc (so it was last). Easily fix

Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-14 Thread Dennis Poon
Michael Van Canneyt wrote: On Fri, 14 Mar 2014, Dennis Poon wrote: the content appeared as garbage. I already specified the CHARSET=utf8 in the Create Table SQL. Did you set the TSQLConnection.Charset property to UTF8 as well ? I set it to utf8 (UTF-8 will raise exception) but still

Re: [fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-14 Thread Michael Van Canneyt
On Fri, 14 Mar 2014, Dennis Poon wrote: Is TSQLQuery.AppleUpdate works with UTF8 string field content? I fetched a web page and extracted part of its content and appended it into TSQLQuery record's string field. The web page content is Chinese in UTF-8 encoding. I 'writeln' the content be

[fpc-pascal] TSQLQuery.ApplyUpdates problem with UTF-8

2014-03-14 Thread Dennis Poon
Is TSQLQuery.AppleUpdate works with UTF8 string field content? I fetched a web page and extracted part of its content and appended it into TSQLQuery record's string field. The web page content is Chinese in UTF-8 encoding. I 'writeln' the content before appending it and it appeared normal in

Re: [fpc-pascal] Elegant way to switch sort mechanism in TSortedCollection?

2014-03-14 Thread Yann Mérignac
Depending on the number of possible sort orders, may be it is better to have one collection by possible sort order and to permanently keep the collections sorted. 2014-03-13 22:26 GMT+01:00 Jim Leonard : > On 3/13/2014 3:49 PM, Frederic Da Vitoria wrote: > >> You are sorting only for display pur

[fpc-pascal] Request for help

2014-03-14 Thread Michael Van Canneyt
Hi, I'm helping the editor of Blaise Pascal magazine to develop some components for Lazarus & Delphi (for the Leap Motion). We need someone with experience in 3D-rendering to help out in writing some code. If you think you can do this, please visit http://www.blaisepascal.eu/index.php?actie