Re: [Lazarus] RFC : "Resolved View"

2016-02-12 Thread Giuliano Colla
Il 12/02/2016 02:41, Martin Frb ha scritto: Actual hiding is more work, because it needs to shift x positions in some line. Probably needs big changes. Though readonly may be doable. IMHO such a feature would be typically used to read and understand code, therefore read-only is not only

Re: [Lazarus] Loading OpenGL error

2016-02-12 Thread Aradeonas
I reinstall everything and tried a new test : 1. add lazopenglcontext 2. add OpenGLContext unit 3. type O:=TOpenGLControl.Create(self); 4. run and no problem. 5. type  o.Parent:=self; 6. run and that error again. Regards, Ara -- http://www.fastmail.com - Accessible with your email

Re: [Lazarus] Tool to convert a multiline text to a pascal string constant

2016-02-12 Thread Marco van de Voort
On Thu, Feb 11, 2016 at 11:08:12AM +0100, Michalis Kamburelis wrote: > Hm, I admit I simply didn't know about them long time ago, when creating > file_to_pascal_xxx utilities in PasDoc:) > > Looking at them now: > > 1. They both have quite longer code than our simple > file_to_pascal_string.dpr

Re: [Lazarus] Tool to convert a multiline text to a pascal string constant

2016-02-12 Thread Michael Van Canneyt
On Fri, 12 Feb 2016, Marco van de Voort wrote: On Thu, Feb 11, 2016 at 11:08:12AM +0100, Michalis Kamburelis wrote: Hm, I admit I simply didn't know about them long time ago, when creating file_to_pascal_xxx utilities in PasDoc:) Looking at them now: 1. They both have quite longer code

Re: [Lazarus] searching the net

2016-02-12 Thread Reimar Grabowski
On Fri, 12 Feb 2016 08:30:46 +0100 duilio foschi wrote: > I'd like to programmatically query intenet for a number of keys, say "key1 > key2 key3" and get the number of hits. Any browser will do. > > How do I do this ? Use fpHttpClient and do a standard HTTP request? No

Re: [Lazarus] RFC : "Resolved View"

2016-02-12 Thread Michael Van Canneyt
On Fri, 12 Feb 2016, Martin Frb wrote: On 11/02/2016 23:54, Michael Van Canneyt wrote: By this I mean a view of a unit as the compiler will see it: - Correct include files included This has been long on the list. But still no in the doing. Ignoring: - any high/low-light or other markup

Re: [Lazarus] searching the net

2016-02-12 Thread Lukasz Sokol
On 12/02/16 07:30, duilio foschi wrote: > I'd like to programmatically query intenet for a number of keys, say > "key1 key2 key3" and get the number of hits. Any browser will do. > > How do I do this ? > CreateProcess - invoke a browser with parameters, or ShellExecute with appropriate URL -

[Lazarus] non Unicodode application

2016-02-12 Thread Michael Schnell
Hi Experts, A friend of mine wants to port an application from Delphi 7 to a be a Lazarus 64 Bit Windows application. This (huge) application only features a very limited GIU, but uses strings lot for "uncoded" characters, going in and out via TCP/IP. Any automatic type conversion would

Re: [Lazarus] searching the net

2016-02-12 Thread Graeme Geldenhuys
On 2016-02-12 12:52, Reimar Grabowski wrote: > Use fpHttpClient and do a standard HTTP request? No browser needed. Indeed. And the URL syntax for Google would be: https://www.google.co.uk/search?q=XYZ Where XYZ is your search term. Then simply parse the resulting page and extract the info you

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Kostas Michalopoulos
I suppose a more clear question would be... is it possible for now and the foreseeable future to have FPC (3.0+, not just 2.x) make the "string" type (not rawbytestring or anything else) behave as it was behaving always since the beginning of time without any source code changes but (say) via

Re: [Lazarus] RFC : "Resolved View"

2016-02-12 Thread Michael Van Canneyt
On Fri, 12 Feb 2016, Mattias Gaertner wrote: On Fri, 12 Feb 2016 00:54:38 +0100 (CET) Michael Van Canneyt wrote: [...] By this I mean a view of a unit as the compiler will see it: - Correct include files included - IFDefs properly resolved. The IDE groks include

Re: [Lazarus] Lazarus application crash. Is PostMessage thread safe?

2016-02-12 Thread Michael Schnell
On 02/12/2016 03:17 PM, Mattias Gaertner wrote: IMHO, Michael, you should not redefine words. It confuses people. Reentrant means it can be called again, while it is still running. It does not need to be thread-safe. Sorry that was not me. The subject here is " thread save " ,so I

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Michael Van Canneyt
On Fri, 12 Feb 2016, Michael Schnell wrote: On 02/12/2016 03:16 PM, Michael Van Canneyt wrote: On Fri, 12 Feb 2016, Michael Schnell wrote: On 02/12/2016 02:38 PM, Michael Van Canneyt wrote: Just use RawByteString as stringtype for all parameters and variables in calls where you don't

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Juha Manninen
On Fri, Feb 12, 2016 at 4:18 PM, Michael Schnell wrote: > Now a friend of mine is faced by a similar task. But here he wants to keep a > (small) GUI and he does not want to go for Linux but for 64 Bit. Both Delphi and FPC now support 64-bit. I don't know how that relates to

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Juha Manninen
On Fri, Feb 12, 2016 at 3:25 PM, Michael Schnell wrote: > Any automatic type conversion would kill the application. > [...] > will this be possible with future versions of Lazarus ,as well ? I guess you mean automatic encoding conversion for strings. (?) The automatic

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Michael Schnell
On 02/12/2016 02:38 PM, Michael Van Canneyt wrote: Just use RawByteString as stringtype for all parameters and variables in calls where you don't want code page conversions to occur. This would mean rewriting the complete application. This obviously is not desired . -Michael --

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Michael Schnell
On 02/12/2016 03:16 PM, Michael Van Canneyt wrote: Tish... {$define String:=RawByteString} and you are done. I'll let him know... -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Graeme Geldenhuys
On 2016-02-12 14:16, Michael Van Canneyt wrote: > {$define String:=RawByteString} > > and you are done. Awesome! FPC:1 Delphi: 0 :) Regards, G. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Michael Schnell
On 02/12/2016 03:16 PM, Michael Van Canneyt wrote: On Fri, 12 Feb 2016, Michael Schnell wrote: On 02/12/2016 02:38 PM, Michael Van Canneyt wrote: Just use RawByteString as stringtype for all parameters and variables in calls where you don't want code page conversions to occur. This

Re: [Lazarus] Lazarus application crash. Is PostMessage thread safe?

2016-02-12 Thread Michael Schnell
On 02/10/2016 10:12 PM, C Western wrote: My understanding is Application.ProcessMessages has to be reentrant ... As calling Application.ProcessMessages is only allowed from the main thread it does not need to be reentrant = thread-save. Of course it can be called recursively and it hence

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Michael Schnell
On 02/12/2016 02:57 PM, Juha Manninen wrote: And yes, often the same arguments were repeated by the same person who started this thread. At the time I did those researches and discussions, my colleagues here were interested in porting their Delphi application to Linux using Lazarus and I

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Michael Van Canneyt
On Fri, 12 Feb 2016, Michael Schnell wrote: Hi Experts, A friend of mine wants to port an application from Delphi 7 to a be a Lazarus 64 Bit Windows application. This (huge) application only features a very limited GIU, but uses strings lot for "uncoded" characters, going in and out via

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Michael Van Canneyt
On Fri, 12 Feb 2016, Michael Schnell wrote: On 02/12/2016 02:38 PM, Michael Van Canneyt wrote: Just use RawByteString as stringtype for all parameters and variables in calls where you don't want code page conversions to occur. This would mean rewriting the complete application. This

[Lazarus] Bug in MY code. fpc 3.0.0 did NOT detect - leads to strange error.

2016-02-12 Thread Donald Ziesig
Hi All! After a multi-day debugging binge, I found the problem described in my previous email. Quick summary: Common Library has a unit which defines a generic class that itself is derived from a class from another unit of the same library. Application Library has many units which

Re: [Lazarus] 5dpo components last update

2016-02-12 Thread Paulo Costa
On 11-Feb-16 23:33, Michael Van Canneyt wrote: On Thu, 11 Feb 2016, Paulo Costa wrote: On 11-Feb-16 21:48, Michael Van Canneyt wrote: The most important changes are: - TSdpoSerial tested and working on the Raspberry Pi 2. Question: can these components be used to work with the pi's

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Juha Manninen
On Fri, Feb 12, 2016 at 3:38 PM, Michael Van Canneyt wrote: > Just use RawByteString as stringtype for all parameters and variables > in calls where you don't want code page conversions to occur. The compiler > will not touch the codepage then. Ok, true. That works, too.

Re: [Lazarus] Lazarus application crash. Is PostMessage thread safe?

2016-02-12 Thread Mattias Gaertner
On Fri, 12 Feb 2016 14:53:29 +0100 Michael Schnell wrote: > On 02/10/2016 10:12 PM, C Western wrote: > > > > My understanding is Application.ProcessMessages has to be reentrant ... > > As calling Application.ProcessMessages is only allowed from the main > thread it does not

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Mattias Gaertner
On Fri, 12 Feb 2016 15:38:49 +0200 Juha Manninen wrote: > On Fri, Feb 12, 2016 at 3:25 PM, Michael Schnell wrote: > > Any automatic type conversion would kill the application. > > [...] > > will this be possible with future versions of Lazarus ,as

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Michael Schnell
On 02/12/2016 05:37 PM, Dmitry Boyarintsev wrote: In this particular case (of porting Delphi 7 code straight to FPC 3.0.0) is a matter of backward compatibility. Yep. Not only to D7, but also to legacy fpc and Lazarus versions, that (as we all know) were modeled after D7 (and friends). I

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Juha Manninen
On Fri, Feb 12, 2016 at 6:52 PM, Michael Schnell wrote: > I think that it is *very* desirable to provide configuration options to > provide full backwards compatibility (while still allow to use as many of > the new features as possible when explicitly writing coding for

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Michael Schnell
This does sound good. :-) -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Michael Schnell
On 02/12/2016 05:23 PM, Mattias Gaertner wrote: If your friend use string literals in Delphi they are encoded in system code page. Here might be some traps. He will easily be able to handle this . Thanks a lot ! -Michael -- ___ Lazarus mailing

Re: [Lazarus] RFC : "Resolved View"

2016-02-12 Thread Mattias Gaertner
On Fri, 12 Feb 2016 15:25:11 +0100 (CET) Michael Van Canneyt wrote: >[...] > > What about include files used twice in a unit? > > Yes, that happens in the RTL as a kind of poor-mans generics. That's no problem when the file compiles. But while typing a directive the

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Michael Schnell
On 02/12/2016 03:54 PM, Juha Manninen wrote: Sure there is hope. See the new UTF-8 support: http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus I'll let him know... And of course I will take read this myself, too. In fact he does not want "Better_Unicode_Support" but

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Michael Schnell
On 02/12/2016 03:54 PM, Juha Manninen wrote: Both Delphi and FPC now support 64-bit. I don't know how that relates to dynamic String encoding. . http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus AFAIK, any 64 bit Delphi forces UTF-16 Unicode and cant do what is described in

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Michael Schnell
On 02/12/2016 03:54 PM, Juha Manninen wrote: Sure there is hope. See the new UTF-8 support: http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus This page says: "This page covers Unicode support in Lazarus programs (console or server, no GUI) and applications (GUI with LCL) using

Re: [Lazarus] RFC : "Resolved View"

2016-02-12 Thread Michael Van Canneyt
On Fri, 12 Feb 2016, Mattias Gaertner wrote: On Fri, 12 Feb 2016 15:25:11 +0100 (CET) Michael Van Canneyt wrote: [...] What about include files used twice in a unit? Yes, that happens in the RTL as a kind of poor-mans generics. That's no problem when the file

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Mattias Gaertner
On Fri, 12 Feb 2016 16:41:23 +0100 Michael Schnell wrote: > On 02/12/2016 03:54 PM, Juha Manninen wrote: > > Sure there is hope. See the new UTF-8 support: > >http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus > > > This page says: > > "This page covers Unicode

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Dmitry Boyarintsev
On Fri, Feb 12, 2016 at 9:16 AM, Michael Van Canneyt wrote: > {$define String:=RawByteString} > > and you are done. > How to achieve the same effect from command line? thanks, Dmitry -- ___ Lazarus mailing list

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Mattias Gaertner
On Fri, 12 Feb 2016 17:16:29 +0100 (CET) Michael Van Canneyt wrote: >[...] > >> {$define String:=RawByteString} >[...] > Type >T = Type Ansistring(850); AFAIK this was introduced with Delphi 2009. Not available in Delphi 7. Mattias --

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Mattias Gaertner
On Fri, 12 Feb 2016 15:16:38 +0100 (CET) Michael Van Canneyt wrote: >[...] > {$define String:=RawByteString} > > and you are done. Won't compile when calling RTL functions with var parameters. I fail to see why RawByteString should do less conversions than using

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Michael Van Canneyt
On Fri, 12 Feb 2016, Mattias Gaertner wrote: On Fri, 12 Feb 2016 15:16:38 +0100 (CET) Michael Van Canneyt wrote: [...] {$define String:=RawByteString} and you are done. Won't compile when calling RTL functions with var parameters. I fail to see why RawByteString

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Michael Schnell
On 02/12/2016 03:55 PM, Mattias Gaertner wrote: True, although the wording might be misleading. FPC 3.0+ does not arbitrarily change encoding of strings. That's why the LCL can use UTF-8 in AnsiStrings even without the new UTF-8 mode. It then works pretty similar to FPC 2.6.4. This is exactly

Re: [Lazarus] RFC : "Resolved View"

2016-02-12 Thread Martin Frb
On 12/02/2016 12:45, Michael Van Canneyt wrote: Well, if it is on the todo list, I don't need to file a feature request ;) Not really on todo, only remembered as being wanted. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Michael Schnell
On 02/12/2016 03:53 PM, Mattias Gaertner wrote: Your friend can use the LCL for the GUI with disabled UTF-8 mode. Sounds great ! He has to check (convert) the strings between his TCP/IP code and the LCL controls (e.g. UTF8ToSys). As he has only a small GUI this should be easy. No problem.

Re: [Lazarus] 5dpo components last update

2016-02-12 Thread Michael Van Canneyt
On Fri, 12 Feb 2016, Paulo Costa wrote: On 11-Feb-16 23:33, Michael Van Canneyt wrote: On Thu, 11 Feb 2016, Paulo Costa wrote: On 11-Feb-16 21:48, Michael Van Canneyt wrote: The most important changes are: - TSdpoSerial tested and working on the Raspberry Pi 2. Question: can these

Re: [Lazarus] RFC : "Resolved View"

2016-02-12 Thread Martin Frb
On 12/02/2016 16:10, Michael Van Canneyt wrote: On Fri, 12 Feb 2016, Martin Frb wrote: Not really on todo, only remembered as being wanted. Should I file a request anyway or has memory been sufficiently refreshed ? I had not yet read Mattias will go for a different approach solving it.

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Mattias Gaertner
On Fri, 12 Feb 2016 16:53:12 +0100 Michael Schnell wrote: >[...] > > even without the new UTF-8 mode. > How to set this mode when compiling with Lazarus ? See here http://wiki.freepascal.org/Lazarus_with_FPC3.0_without_UTF-8_mode > What mode do you think is more

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Dmitry Boyarintsev
On Fri, Feb 12, 2016 at 11:24 AM, Sven Barth wrote: > Am 12.02.2016 17:16 schrieb "Dmitry Boyarintsev" < > skalogryz.li...@gmail.com>: > > > > On Fri, Feb 12, 2016 at 9:16 AM, Michael Van Canneyt < > mich...@freepascal.org> wrote: > >> > >> {$define

Re: [Lazarus] RFC : "Resolved View"

2016-02-12 Thread Michael Van Canneyt
On Fri, 12 Feb 2016, Martin Frb wrote: On 12/02/2016 12:45, Michael Van Canneyt wrote: Well, if it is on the todo list, I don't need to file a feature request ;) Not really on todo, only remembered as being wanted. Should I file a request anyway or has memory been sufficiently refreshed

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Sven Barth
Am 12.02.2016 17:16 schrieb "Dmitry Boyarintsev" : > > On Fri, Feb 12, 2016 at 9:16 AM, Michael Van Canneyt < mich...@freepascal.org> wrote: >> >> {$define String:=RawByteString} >> >> and you are done. > > > How to achieve the same effect from command line? Just

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Michael Van Canneyt
On Fri, 12 Feb 2016, Sven Barth wrote: Am 12.02.2016 17:16 schrieb "Dmitry Boyarintsev" wrote: {$define String:=RawByteString} and you are done. How to achieve the same effect

[Lazarus] Guess the problem with Heap

2016-02-12 Thread Aradeonas
Hi, Im working on one of my projects and tried to make a release version, so I used shortcut button in build modes and add release mode but when I compile and run I get SIGSEGV error when main form want to be create. After many tries I found out that if I check "Use Heaptrc unit" in project

Re: [Lazarus] Guess the problem with Heap

2016-02-12 Thread Martin Frb
On 12/02/2016 19:04, Aradeonas wrote: Hi, Im working on one of my projects and tried to make a release version, so I used shortcut button in build modes and add release mode but when I compile and run I get SIGSEGV error when main form want to be create. After many tries I found out that if I

Re: [Lazarus] 5dpo components last update

2016-02-12 Thread Michael Van Canneyt
On Fri, 12 Feb 2016, Paulo Costa wrote: On 12-Feb-16 16:04, Michael Van Canneyt wrote: Can you also send me the complete configuration you used ? The setup: Raspberry Pi 2 Model B Raspbian Jessie (Debian version 8.0) Lazarus 1.2.4+dfsg2-1 (It is the version available on their repository.

Re: [Lazarus] non Unicodode application

2016-02-12 Thread Sven Barth
Am 12.02.2016 17:37 schrieb "Dmitry Boyarintsev" : > > On Fri, Feb 12, 2016 at 11:24 AM, Sven Barth wrote: >> >> Am 12.02.2016 17:16 schrieb "Dmitry Boyarintsev" < skalogryz.li...@gmail.com>: >> > >> > On Fri, Feb 12, 2016 at 9:16 AM,

Re: [Lazarus] 5dpo components last update

2016-02-12 Thread Paulo Costa
On 12-Feb-16 16:04, Michael Van Canneyt wrote: Can you also send me the complete configuration you used ? The setup: Raspberry Pi 2 Model B Raspbian Jessie (Debian version 8.0) Lazarus 1.2.4+dfsg2-1 (It is the version available on their repository. Call me lazy :) fpc 2.6.4+dfsg-4+rpi1