Re: [Lazarus] "Running" a library

2012-09-14 Thread Mark Morgan Lloyd
Rolf Grunsky wrote: It's been a very long time since I looked at this, and this is specific to Windows. An exe and dll have the same basic structure, the difference is that an exe can not export entry points and part of the startup will initialize the stack and data segments. On the other hand

Re: [Lazarus] Issue with GroupBox background color

2012-09-14 Thread zeljko
On Friday 14 of September 2012 21:35:19 Krzysztof wrote: > I found solution on forum. Problem solved when I set color to clForm > or clBackground to all controls (with form included). But this is some > kind of inconsistency. Controls which don't have transparency (e.g > TLabel is transparent) but

Re: [Lazarus] Feature request: Single-file mode

2012-09-14 Thread Alexander Klenin
On Sat, Sep 15, 2012 at 1:08 AM, Mattias Gaertner wrote: > > No lpi, so no compiler options and no packages. Basically, yes, although compiler options could be saved in the source as directive. One of the goals is that "Build single file" from Lazarus to be exactly equivalent to "fpc file.pp" fro

Re: [Lazarus] "Running" a library

2012-09-14 Thread Rolf Grunsky
On 12-09-14 10:39 AM, leledumbo wrote: Currently, if we have a library project, there's no way to test it without creating 2nd project which is an application. Should Lazarus implement something like V$ does? i.e. when "Run" is executed on a library project, the IDE then ask for an executable to

Re: [Lazarus] "Running" a library

2012-09-14 Thread leledumbo
> A library cannot be run alone. However there 2 kinds of libraries: a dynamic library (.dll, .so) and a static library. You can test your library code by creating a program that links the code statically, or uses its code units directly. Ehm... FPC can't create static libraries... anymore :)

Re: [Lazarus] "Running" a library

2012-09-14 Thread Mark Morgan Lloyd
Juha Manninen wrote: On Fri, Sep 14, 2012 at 10:34 PM, Mark Morgan Lloyd wrote: No, I was wondering about the extent to which a library could be defined such that it was also runnable as a program. A library cannot be run alone. However there 2 kinds of libraries: a dynamic library (.dll, .so

Re: [Lazarus] "Running" a library

2012-09-14 Thread Juha Manninen
On Fri, Sep 14, 2012 at 10:34 PM, Mark Morgan Lloyd wrote: > No, I was wondering about the extent to which a library could be defined > such that it was also runnable as a program. A library cannot be run alone. However there 2 kinds of libraries: a dynamic library (.dll, .so) and a static librar

Re: [Lazarus] Process ID

2012-09-14 Thread Mark Morgan Lloyd
Marco van de Voort wrote: On Fri, Sep 14, 2012 at 11:55:52AM +0200, Michael Schnell wrote: Yet another approach of ransacking the whole disk. /proc is not on a disk. It's a virtual file system that generates it's content only on request. In Linux, "everything" is (accessible as if it were) a

Re: [Lazarus] Issue with GroupBox background color

2012-09-14 Thread Krzysztof
I found solution on forum. Problem solved when I set color to clForm or clBackground to all controls (with form included). But this is some kind of inconsistency. Controls which don't have transparency (e.g TLabel is transparent) but flat background, should have this same color by default. --

Re: [Lazarus] "Running" a library

2012-09-14 Thread Mark Morgan Lloyd
Juha Manninen wrote: On Fri, Sep 14, 2012 at 7:56 PM, Mark Morgan Lloyd wrote: Couldn't this be specified as the "Launching application" parameter? Actually it is defined in Run -> Run Parameters ... -> Host application I was thinking about the case where some sort of wrapper was needed to

Re: [Lazarus] Process ID

2012-09-14 Thread Alberto Narduzzi
Yeah. Everybody doing his own parsing of system textfiles is *such* a good principle to build durable applications on *g* as far as the text files maintain their structure, well, indeed it is. *g* -- ___ Lazarus mailing list Lazarus@lists.lazarus.fre

Re: [Lazarus] Process ID

2012-09-14 Thread Marco van de Voort
On Fri, Sep 14, 2012 at 11:55:52AM +0200, Michael Schnell wrote: > > Yet another approach of ransacking the whole disk. > > /proc is not on a disk. It's a virtual file system that generates it's > content only on request. > > In Linux, "everything" is (accessible as if it were) a file (or a > d

Re: [Lazarus] "Running" a library

2012-09-14 Thread Juha Manninen
On Fri, Sep 14, 2012 at 7:56 PM, Mark Morgan Lloyd wrote: > Couldn't this be specified as the "Launching application" parameter? Actually it is defined in Run -> Run Parameters ... -> Host application > I think a fair question is whether a library can be built in such a way that > it can also b

Re: [Lazarus] OT: Cute little toy program

2012-09-14 Thread Mark Morgan Lloyd
Terry Haimann wrote: Wrote a toy app that calculates time/date on Mars. Note as written it won't work under Windows. I didn't see a way to write a generic routine to get the Time- Zone. I ended up running an external process using the Linux Date Program. www.HaimannOnline.com/Astronomy/Mar

Re: [Lazarus] Brush color on TListView

2012-09-14 Thread Benito van der Zander
On 09/13/2012 02:51 PM, Alexsander Rosa wrote: 2012/9/13 Benito van der Zander > I ended up writing my own list view (http://www.benibela.de/components_en.html#treelistview), just to get differently colored rows May we use your component on a proprietar

Re: [Lazarus] "Running" a library

2012-09-14 Thread Mark Morgan Lloyd
leledumbo wrote: Currently, if we have a library project, there's no way to test it without creating 2nd project which is an application. Should Lazarus implement something like V$ does? i.e. when "Run" is executed on a library project, the IDE then ask for an executable to run (the executable us

[Lazarus] OT: Cute little toy program

2012-09-14 Thread Terry Haimann
Wrote a toy app that calculates time/date on Mars. Note as written it won't work under Windows. I didn't see a way to write a generic routine to get the Time- Zone. I ended up running an external process using the Linux Date Program. www.HaimannOnline.com/Astronomy/MartianTime.zip Terry H.

[Lazarus] "Running" a library

2012-09-14 Thread leledumbo
Currently, if we have a library project, there's no way to test it without creating 2nd project which is an application. Should Lazarus implement something like V$ does? i.e. when "Run" is executed on a library project, the IDE then ask for an executable to run (the executable uses the library, so

Re: [Lazarus] Process ID

2012-09-14 Thread Reinier Olislagers
On 14-9-2012 15:47, Michael Schnell wrote: > On 09/14/2012 01:47 PM, Reinier Olislagers wrote: >> Sorry, no idea what you're talking about there, especially the >> relationship between your first and second sentence > Maybe I (not an English native speaker) misunderstood your wording. I > understoo

Re: [Lazarus] OnGuard - Install

2012-09-14 Thread Marcos Douglas
On Thu, Sep 13, 2012 at 6:12 PM, Marcos Douglas wrote: > Hi, > > Anyone here use the OnGuard? > https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/onguard > > I installed, but do not know if there is something wrong with the package. > - open the lpk > - compile > - install (re

Re: [Lazarus] Feature request: Single-file mode

2012-09-14 Thread Mattias Gaertner
Alexander Klenin hat am 14. September 2012 um 15:35 geschrieben: > See this forum discussion for context: > http://forum.lazarus.freepascal.org/index.php/topic,17932.msg102309.html#msg102309 > > Below is the relevant portion of my post: > > Finally, I have closely related, but more complex, reque

Re: [Lazarus] Process ID

2012-09-14 Thread Michael Schnell
On 09/14/2012 01:47 PM, Reinier Olislagers wrote: Sorry, no idea what you're talking about there, especially the relationship between your first and second sentence Maybe I (not an English native speaker) misunderstood your wording. I understood your "entire" in a way that you wanted _all_possib

[Lazarus] Feature request: Single-file mode

2012-09-14 Thread Alexander Klenin
See this forum discussion for context: http://forum.lazarus.freepascal.org/index.php/topic,17932.msg102309.html#msg102309 Below is the relevant portion of my post: Finally, I have closely related, but more complex, request -- introduce "Single-file mode" into Lazarus, where Lazarus does not creat

Re: [Lazarus] OnGuard - Install

2012-09-14 Thread Marcos Douglas
On Thu, Sep 13, 2012 at 7:50 PM, Graeme Geldenhuys wrote: > > > [snip] > > I must admit, I haven't tested with LCL recently, but I definitely know the > core (non-GUI parts) of OnGuard definitely works under Linux and Windows, > 32- and 64-bit systems. Take a look in the paths. The LCL sources ar

Re: [Lazarus] OnGuard - Install

2012-09-14 Thread Marcos Douglas
On Thu, Sep 13, 2012 at 7:50 PM, Graeme Geldenhuys wrote: > On 13/09/12 22:12, Marcos Douglas wrote: >> >> >> Anyone here use the OnGuard? > > > Yup, we use it in our current projects. > > >> >> https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/onguard > > > I have my own main

Re: [Lazarus] Process ID

2012-09-14 Thread Reinier Olislagers
On 14-9-2012 13:12, Michael Schnell wrote: > On 09/14/2012 12:43 PM, Reinier Olislagers wrote: >> t encapsulates the entire sorry mess then, and supports Linux, OSX, >> Solaris, AIX... > This very obviously is impossible. But FPC-RTL and LCL always are an > open source work in progress and at any t

Re: [Lazarus] Process ID

2012-09-14 Thread Michael Schnell
On 09/14/2012 12:43 PM, Reinier Olislagers wrote: t encapsulates the entire sorry mess then, and supports Linux, OSX, Solaris, AIX... This very obviously is impossible. But FPC-RTL and LCL always are an open source work in progress and at any time can easily be enhanced by any sensible function

Re: [Lazarus] Process ID

2012-09-14 Thread Chavoux Luyt
On 14 September 2012 12:43, Reinier Olislagers wrote: > On 14-9-2012 12:09, Michael Schnell wrote: > > On 09/14/2012 11:59 AM, Sven Barth wrote: > >> > >> Though I don't want to suggest that syscall I have to state that by > >> default FPC (at least on Linux) always uses the Kernel interface. :) >

Re: [Lazarus] Process ID

2012-09-14 Thread Reinier Olislagers
On 14-9-2012 12:09, Michael Schnell wrote: > On 09/14/2012 11:59 AM, Sven Barth wrote: >> >> Though I don't want to suggest that syscall I have to state that by >> default FPC (at least on Linux) always uses the Kernel interface. :) > I do know this, but this (RTL/LCL) is a "standard library" (like

Re: [Lazarus] Process ID

2012-09-14 Thread Michael Schnell
On 09/14/2012 11:59 AM, Sven Barth wrote: Though I don't want to suggest that syscall I have to state that by default FPC (at least on Linux) always uses the Kernel interface. :) I do know this, but this (RTL/LCL) is a "standard library" (like glib, though not dynamic). Doing direct syscalls

Re: [Lazarus] Process ID

2012-09-14 Thread Sven Barth
Am 14.09.2012 11:48, schrieb Michael Schnell: On 09/13/2012 06:10 PM, Henry Vermaak wrote: On 13/09/12 17:04, Marco van de Voort wrote: but use of sysctl is strongly discouraged now (in favour of /proc). There not even is a wrapper in glibc for sysctl, so you will need to call it directly via

Re: [Lazarus] Process ID

2012-09-14 Thread Michael Schnell
On 09/13/2012 05:48 PM, Jürgen Hestermann wrote: If it's completely in memory then it makes sense. In fact it does not even exist. It's just a standard (straight forward, well structured, programmer-friendly) way to access information. -Michael -- _

Re: [Lazarus] Process ID

2012-09-14 Thread Michael Schnell
On 09/13/2012 05:22 PM, Jürgen Hestermann wrote: Yet another approach of ransacking the whole disk. /proc is not on a disk. It's a virtual file system that generates it's content only on request. In Linux, "everything" is (accessible as if it were) a file (or a directory). This is a _goo

Re: [Lazarus] Process ID

2012-09-14 Thread Michael Schnell
On 09/13/2012 06:10 PM, Henry Vermaak wrote: On 13/09/12 17:04, Marco van de Voort wrote: but use of sysctl is strongly discouraged now (in favour of /proc). There not even is a wrapper in glibc for sysctl, so you will need to call it directly via the Kernel interface. Not really recommended