Re: [Lazarus] Working on big units

2015-10-21 Thread Aradeonas
> Short cut is by default Alt- Or Ctrl+click > There are shortcuts to fold ALL nodes at a specific level. alt-shift-1 (or 2, 3 4 ... for level) alt-shift-0 unfold depending on what you have configured as fold-able try alt-shift-3 (maybe 4) and you just see function headers. Very good! But sadly f

Re: [Lazarus] Working on big units

2015-10-21 Thread Martin Frb
On 21/10/2015 21:02, Martin Frb wrote: folding (if that is your thing) There are shortcuts to fold ALL nodes at a specific level. alt-shift-1 (or 2, 3 4 ... for level) alt-shift-0 unfold depending on what you have configured as fold-able try alt-shift-3 (maybe 4) and you just see function he

Re: [Lazarus] Where in Lazarus 1.5 do I set the project search path?

2015-10-21 Thread Mattias Gaertner
On Wed, 21 Oct 2015 23:46:07 +0200 Bo Berglund wrote: > Stupid question but when I google I find "solutions" that direct me to > Project/Project Options/Compiler/Paths and Inherited of which only > Paths exist... The "Inherited Path" are nowadays found in "Project / Project Options / Show Option

Re: [Lazarus] Working on big units

2015-10-21 Thread Mattias Gaertner
On Wed, 21 Oct 2015 22:54:06 +0200 Marc Santhoff wrote: >[...] > And not to forget, put the cursor inside a variable name or class name > or function name, use the right mouse key for popping up the context > menu and select > > "find declaration of ..." Short cut is by default Alt- Mattias

Re: [Lazarus] Working on big units

2015-10-21 Thread Aradeonas
Thank you all. Regards, Ara -- http://www.fastmail.com - Access all of your messages and folders wherever you are -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/

Re: [Lazarus] Working on big units

2015-10-21 Thread Marcos Douglas
On Wed, Oct 21, 2015 at 7:52 PM, Aradeonas wrote: > Its similar to to Controls.pas in Delphi7 but class are big but its not the > point > Because was coded in a big company doesn't mean was right coded. But, as you said, its not the point. > (I just didnt wanted to put each control in one unit)

Re: [Lazarus] Working on big units

2015-10-21 Thread Aradeonas
Its similar to to Controls.pas in Delphi7 but class are big but its not the point (I just didnt wanted to put each control in one unit) my point is finding out browsing and editing big units. Regards, Ara -- http://www.fastmail.com - Send your email first class --

Re: [Lazarus] Working on big units

2015-10-21 Thread Marcos Douglas
On Wed, Oct 21, 2015 at 5:45 PM, Aradeonas wrote: > I Just work on one of my units with about 10,000 line of code that have 7 > class and it makes me crazy moving in it and adding procedure or editing and > sometimes I get lost that where am I. Just want to ask you how you work with > big units? h

[Lazarus] Where in Lazarus 1.5 do I set the project search path?

2015-10-21 Thread Bo Berglund
Stupid question but when I google I find "solutions" that direct me to Project/Project Options/Compiler/Paths and Inherited of which only Paths exist... Then I am directed to source editor / popup menu / file settings / unit info / unit paths But there is no such thing in my Lazarus... On the Paths

Re: [Lazarus] Working on big units

2015-10-21 Thread Aradeonas
> If you used "find declaration", that adds a jump point, and you can go > back ctrl-h (I recommend you put that on a key you like) You can also > add your own jump points. (search the menu, or keymapping) > > Also look at the overview gutter (next to scrollbar), it shows where > interface and impl

Re: [Lazarus] Working on big units

2015-10-21 Thread Martin Frb
On 21/10/2015 21:58, Aradeonas wrote: Thanks, Im using all of these tools except folding (I just use JCF and it is very good at losing the point that where you was!) and still hard to maintain, so it seems its just my problem. If you used "find declaration", that adds a jump point, and you can g

Re: [Lazarus] Working on big units

2015-10-21 Thread Aradeonas
Thanks, Im using all of these tools except folding (I just use JCF and it is very good at losing the point that where you was!) and still hard to maintain, so it seems its just my problem. Regards, Ara -- http://www.fastmail.com - Access all of your messages and folders

Re: [Lazarus] Working on big units

2015-10-21 Thread Marc Santhoff
On Mi, 2015-10-21 at 21:02 +0100, Martin Frb wrote: > Code tools (read the entire page, it is useful not just for navigation) >http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools >Method_Jumping and Find_Declaration > > Code explorer (try it, the description is not that good)) >ht

Re: [Lazarus] Working on big units

2015-10-21 Thread Martin Frb
On 21/10/2015 20:53, Aradeonas wrote: But I remember I read somewhere Its good too have minimum count of units and also its easier to use and also I saw many units that have thousands of code and its interesting that how they work on these codes? These classes are in a subject like controls and

Re: [Lazarus] Working on big units

2015-10-21 Thread DougC
I think you have taken the advice you read somewhere too seriously. You have taken it to an extreme that invalidates it. Having a small number of units is not in any way disadvantageous in terms of efficiency from the system's viewpoint. Remember that the unit structure was invented to solve

Re: [Lazarus] Working on big units

2015-10-21 Thread Aradeonas
But I remember I read somewhere Its good too have minimum count of units and also its easier to use and also I saw many units that have thousands of code and its interesting that how they work on these codes? These classes are in a subject like controls and I didnt want to have Edit,Label,List,Pan

Re: [Lazarus] Working on big units

2015-10-21 Thread DougC
The best way to deal with big units is to avoid them completely. Can you explain why you are using such a big unit if it is causing you these problems? On Wed, 21 Oct 2015 15:45:07 -0400 Aradeonas wrote I Just work on one of my units with about 10,0

Re: [Lazarus] Working on big units

2015-10-21 Thread Philippe Lévi
If I don't want to split it in different units I split it in "logical" parts in files and use {$I ...} but with several classes .. it looks like splitting classes in different units should be a way to make it easier! De: Aradeonas Enviado: quarta-feira, 21 de

[Lazarus] Working on big units

2015-10-21 Thread Aradeonas
Hi, I Just work on one of my units with about 10,000 line of code that have 7 class and it makes me crazy moving in it and adding procedure or editing and sometimes I get lost that where am I. Just want to ask you how you work with big units? how you move,browse and edit? Regards, Ara -- http:/

Re: [Lazarus] How does one add an event to a blocking system?

2015-10-21 Thread Mark Morgan Lloyd
Michael Schnell wrote: On 10/21/2015 04:19 PM, Mark Morgan Lloyd wrote: I don't know whether I've overlooked anything significant there, but it appears robust and activity triggered by around half a dozen background threads appears as expected. Of course it's robust. But my use of it migh

Re: [Lazarus] How does one add an event to a blocking system?

2015-10-21 Thread Sven Barth
Am 21.10.2015 14:59 schrieb "Michael Schnell" : > CheckSynchronize() needs to be called by the main thread (in fact a threat becomes the main thread _because_ it calls CheckSynchronize(). The part in parenthesis is wrong. CheckSynchronize checks for MainThreadID which is determined independently o

Re: [Lazarus] Lazarus implementation of TListView etc?

2015-10-21 Thread Sven Barth
Am 21.10.2015 14:39 schrieb "Michael Schnell" : > > On 10/21/2015 02:18 PM, Mattias Gaertner wrote: >> >> And even if you use the Win32 widgetset, you can still have a command line program. > > Of course any executable can be started from the command line. But I don't suppose that this is what Bo m

Re: [Lazarus] Lazarus implementation of TListView etc?

2015-10-21 Thread Graeme Geldenhuys
On 2015-10-21 12:42, Bo Berglund wrote: > With LCL added it does work! I'm with Michael Schnell on this one - that is a terrible idea. So too is the LCL-NoGUI hack. I would instead implement a Mock TListView class that implements the most basic interface your unit requires, but doesn't really do

Re: [Lazarus] FPC 3.0.0-rc2 release

2015-10-21 Thread Sven Barth
Am 21.10.2015 14:36 schrieb "Anthony Walter" : > > A few questions: > > In features - language features: > > Generics are still being listed as experimental. Sven has put a lot of work into them in the past year. When does experimental get dropped? In theory that stigma could be dropped already...

Re: [Lazarus] How does one add an event to a blocking system?

2015-10-21 Thread Michael Schnell
On 10/21/2015 04:19 PM, Mark Morgan Lloyd wrote: I don't know whether I've overlooked anything significant there, but it appears robust and activity triggered by around half a dozen background threads appears as expected. Of course it's robust. But check the CPU usage. It it's 100% all thr

Re: [Lazarus] How does one add an event to a blocking system?

2015-10-21 Thread Mark Morgan Lloyd
Michael Schnell wrote: On 10/21/2015 02:42 PM, Michael Schnell wrote: CheckSynchronize() Unfortunately there is no decent documentation on CheckSynchronize(). So in very short (and just hopefully correct): CheckSynchronize() needs to be called by the main thread (in fact a threat becomes th

Re: [Lazarus] How does one add an event to a blocking system?

2015-10-21 Thread Michael Schnell
On 10/21/2015 03:13 PM, Mark Morgan Lloyd wrote: Thanks, it's one of those things I can never remember. Because it is an fpc rtl thingy and not really meant to be used by Lazarus users ;-) . -Michael -- ___ Lazarus mailing list Lazarus@lists.lazaru

Re: [Lazarus] How does one add an event to a blocking system?

2015-10-21 Thread Mark Morgan Lloyd
Michael Schnell wrote: On 10/21/2015 02:39 PM, Mark Morgan Lloyd wrote: TThread.Synchronize(), TThread.Queue() Please remind us what a non-LCL program has to call to make sure that stuff is dequeued. CheckSynchronize() Thanks, it's one of those things I can never remember. -- Mark Morgan

Re: [Lazarus] How does one add an event to a blocking system?

2015-10-21 Thread Michael Schnell
On 10/21/2015 02:42 PM, Michael Schnell wrote: CheckSynchronize() Unfortunately there is no decent documentation on CheckSynchronize(). So in very short (and just hopefully correct): CheckSynchronize() needs to be called by the main thread (in fact a threat becomes the main thread _because_

Re: [Lazarus] Lazarus implementation of TListView etc?

2015-10-21 Thread Zeljko
On 10/21/2015 02:37 PM, Mark Morgan Lloyd wrote: Zeljko wrote: On 10/21/2015 02:18 PM, Mattias Gaertner wrote: Under Linux/BSD every program is a command line program. It is, but with exception that qtlcl and gtk2lcl cannot run on headless linux machine. I'm giving this objection since one

Re: [Lazarus] How does one add an event to a blocking system?

2015-10-21 Thread Michael Schnell
On 10/21/2015 02:39 PM, Mark Morgan Lloyd wrote: TThread.Synchronize(), TThread.Queue() Please remind us what a non-LCL program has to call to make sure that stuff is dequeued. CheckSynchronize() -Michael -- ___ Lazarus mailing list Lazarus@lists

Re: [Lazarus] How does one add an event to a blocking system?

2015-10-21 Thread Mark Morgan Lloyd
Michael Schnell wrote: On 10/21/2015 01:44 PM, Bo Berglund wrote: So if I use a thread to read data from the socket, how do I signal to the main application that data are arriving using an event? TThread.Synchronize(), TThread.Queue() Please remind us what a non-LCL program has to call to mak

Re: [Lazarus] Lazarus implementation of TListView etc?

2015-10-21 Thread Michael Schnell
On 10/21/2015 02:18 PM, Mattias Gaertner wrote: And even if you use the Win32 widgetset, you can still have a command line program. Of course any executable can be started from the command line. But I don't suppose that this is what Bo meant when he said he wants do do a "command line program".

Re: [Lazarus] FPC 3.0.0-rc2 release

2015-10-21 Thread Anthony Walter
A few questions: In features - language features: Generics are still being listed as experimental. Sven has put a lot of work into them in the past year. When does experimental get dropped? Type helpers and type conversions (implicit/explicit) is missing. Do they deserve to me mentioned in this s

Re: [Lazarus] Lazarus implementation of TListView etc?

2015-10-21 Thread Mark Morgan Lloyd
Zeljko wrote: On 10/21/2015 02:18 PM, Mattias Gaertner wrote: Under Linux/BSD every program is a command line program. It is, but with exception that qtlcl and gtk2lcl cannot run on headless linux machine. I'm giving this objection since one can create cmd line program on windows and then e

Re: [Lazarus] Lazarus implementation of TListView etc?

2015-10-21 Thread Zeljko
On 10/21/2015 02:18 PM, Mattias Gaertner wrote: Under Linux/BSD every program is a command line program. It is, but with exception that qtlcl and gtk2lcl cannot run on headless linux machine. I'm giving this objection since one can create cmd line program on windows and then expect that it

Re: [Lazarus] Lazarus implementation of TListView etc?

2015-10-21 Thread Mattias Gaertner
On Wed, 21 Oct 2015 13:58:38 +0200 Michael Schnell wrote: >[...]. > > With LCL added it does work! > But now it is not a command line program any more. That is wrong in so many ways. As long as you don't add the "interfaces" unit, no external GUI lib is used. And even if you add the interfaces

Re: [Lazarus] How does one add an event to a blocking system?

2015-10-21 Thread leledumbo
> So if I use a thread to read data from the socket, how do I signal to the main application that data are arriving using an event? Exactly, using an event: http://www.freepascal.org/docs-html/fcl/syncobjs/tevent.html Here's an example of how to use: RoundRobinExample.zip

Re: [Lazarus] How does one add an event to a blocking system?

2015-10-21 Thread Michael Schnell
On 10/21/2015 01:44 PM, Bo Berglund wrote: So if I use a thread to read data from the socket, how do I signal to the main application that data are arriving using an event? TThread.Synchronize(), TThread.Queue() In an "Application" (other than in a "Program" you also can use "Application.Queue

Re: [Lazarus] Lazarus implementation of TListView etc?

2015-10-21 Thread Michael Schnell
On 10/21/2015 01:42 PM, Bo Berglund wrote: I just want the unit to compile, but I will not use these methods in the command line application... A very bad idea, indeed. In many cases just using a unit will automatically call procedures in certain (here: GUI) libraries. Moreover using such a uni

[Lazarus] How does one add an event to a blocking system?

2015-10-21 Thread Bo Berglund
I need a TCP port component that can work as a non-blocking port for receiving data. THe data arrival should trigger an event where I can read the data. So if I use a thread to read data from the socket, how do I signal to the main application that data are arriving using an event? Is there some re

Re: [Lazarus] Lazarus implementation of TListView etc?

2015-10-21 Thread Bo Berglund
On Wed, 21 Oct 2015 10:08:40 +0200, Michael Schnell wrote: >On 10/20/2015 07:06 PM, Bo Berglund wrote: >> My program is a pretty simple command line program >Description of TListview: " Use TListView to manage and display a list >of items in a form" > >As a command line application does not have

Re: [Lazarus] Simplest way to have a safe thread queue

2015-10-21 Thread Tony Whyman
Aradeonas, You will probably need to start using semaphores/mutexes to control access from multiple threads if your requirement goes beyond the simple use of critical sections. The problem starts becoming more complex if one or more threads has to wait on the actions of another before accessi

Re: [Lazarus] Simplest way to have a safe thread queue

2015-10-21 Thread Tony Whyman
Look in xv5ipc.inc for the Linux implementation and winipc.inc for the Windows implementation. You are probably not interested in the class TGlobalInterface (other than as example code) as this is the IBSQLMonitor use of the IPC. The other classes may be of interested and are documented in the

Re: [Lazarus] Simplest way to have a safe thread queue

2015-10-21 Thread Aradeonas
I like to have o powerfull solution but an easy way like this[1] also will do my job for now. Regards, Ara Links: 1. http://stackoverflow.com/questions/15027726/how-to-make-a-thread-finish-its-work-before-being-freed/15033839#15033839 -- http://www.fastmail.com - A no graphics, no pop-up

Re: [Lazarus] Simplest way to have a safe thread queue

2015-10-21 Thread Aradeonas
Thanks Tony,Can you help me more where should I look? Regards, Ara -- http://www.fastmail.com - A no graphics, no pop-ups email service -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listi

Re: [Lazarus] TInetSocket usage - any documentation available?

2015-10-21 Thread Michael Schnell
On 10/21/2015 12:19 PM, Mark Morgan Lloyd wrote: In practical terms, there have been a number of "must-have" features in the IDE and LCL- frames as a particular example- which have mandated moving onto a "bleeding-edge" FPC. My experience with Lazarus-1.4.0 and FPC 3.0 rc1 has been generally

Re: [Lazarus] Simplest way to have a safe thread queue

2015-10-21 Thread Aradeonas
Yes, I should said Job queue with thread pool. I just want to have more than one active thread and they work together. Regards, Ara -- http://www.fastmail.com - Email service worth paying for. Try it for free -- ___ Lazarus mailing list Lazarus@list

Re: [Lazarus] Simplest way to have a safe thread queue

2015-10-21 Thread Michael Schnell
On 10/21/2015 12:07 PM, Aradeonas wrote: I want to make a simple and safe queue What exactly do you mean by "Thread Queue" ? Is this the same as a "Thread Pool" (i.e. severakl threads that wait for work and can be assigned a task if necessary without the need of creating a new thread) I onc

Re: [Lazarus] TInetSocket usage - any documentation available?

2015-10-21 Thread Mark Morgan Lloyd
Michael Schnell wrote: On 10/21/2015 11:28 AM, Mark Morgan Lloyd wrote: If that's something you're actively working on it would sound like an eminently sensible suggestion. I had been working on that on and off (and discussing it here) for a long time, but there had been no point in pushing

Re: [Lazarus] Simplest way to have a safe thread queue

2015-10-21 Thread Mattias Gaertner
On Wed, 21 Oct 2015 03:07:48 -0700 Aradeonas wrote: > Hi, [Cross posted on forum so if you want answer there : > http://forum.lazarus.freepascal.org/index.php/topic,30097.0.html] Do not cross post. Mattias -- ___ Lazarus mailing list Lazarus@lists.la

[Lazarus] Simplest way to have a safe thread queue

2015-10-21 Thread Aradeonas
Hi, [Cross posted on forum so if you want answer there : http://forum.lazarus.freepascal.org/index.php/topic,30097.0.html] I want to make a simple and safe queue with multiple worker that do the jobs, so for example I add 10 job and have 2 worker that do the job. For this I read multi threading[1]

Re: [Lazarus] TInetSocket usage - any documentation available?

2015-10-21 Thread Michael Schnell
On 10/21/2015 11:28 AM, Mark Morgan Lloyd wrote: If that's something you're actively working on it would sound like an eminently sensible suggestion. I had been working on that on and off (and discussing it here) for a long time, but there had been no point in pushing it (once I were not in n

[Lazarus] Transparent cursor

2015-10-21 Thread LacaK
Hi, I am trying create custom cursor with transparent background. I want cursor, which looks like frame with inside contents transparent. Look at this code fragment: var B: TBitmap; C: TCursorImage; begin B := TBitmap.Create; B.SetSize(23,15); B.TransparentColor:=clWhite; B.Transpare

Re: [Lazarus] TInetSocket usage - any documentation available?

2015-10-21 Thread Mark Morgan Lloyd
Michael Schnell wrote: On 10/21/2015 10:35 AM, Mark Morgan Lloyd wrote: So noting your concern with events, the real question is still which libraries etc. he should be running to implement a socket client reliably in a console program. Or alternatively, how best to implement a Windows-style

Re: [Lazarus] TInetSocket usage - any documentation available?

2015-10-21 Thread Michael Schnell
On 10/21/2015 10:35 AM, Mark Morgan Lloyd wrote: So noting your concern with events, the real question is still which libraries etc. he should be running to implement a socket client reliably in a console program. Or alternatively, how best to implement a Windows-style service using Lazarus,

[Lazarus] FPC 3.0.0-rc2 release

2015-10-21 Thread Joost van der Sluis
Hello We have placed the second release candidate of the Free Pascal Compiler version 3.0.0 on our ftp servers. Most important change since the first release candidate is a change in the unicode resource-string handling. Also there is a new Windows to Android cross-compiler installer. You can

Re: [Lazarus] TInetSocket usage - any documentation available?

2015-10-21 Thread Michael Schnell
On 10/21/2015 10:35 AM, Mark Morgan Lloyd wrote: Which is fine as a testbed, but not necessarily for production use. It's particularly not fine if you want to start it on a regular basis from cron or whatever, which I think Bo has already settled on. I fully agree: doing a cron-driven timing an

Re: [Lazarus] TInetSocket usage - any documentation available?

2015-10-21 Thread Mark Morgan Lloyd
Michael Schnell wrote: On 10/21/2015 12:33 AM, Bo Berglund wrote: As Mark Morgan Lloyd has pointed out I *really* need to create an encapsulated class for the TCPIP communications so I can use this as an alternate component in the existing object and for this I need to implement an onReceive e

Re: [Lazarus] *SPAM* Re: Win 10 IOT Core

2015-10-21 Thread Michael Schnell
On 10/20/2015 04:36 PM, Paul Breneman wrote: I heard there were patents involved but I don't know anything about those. Happily no software patents in Europe yet :-) , still fighting against TTIP... -Michael -- ___ Lazarus mailing list Lazarus@l

Re: [Lazarus] TInetSocket usage - any documentation available?

2015-10-21 Thread Michael Schnell
On 10/21/2015 12:33 AM, Bo Berglund wrote: As Mark Morgan Lloyd has pointed out I *really* need to create an encapsulated class for the TCPIP communications so I can use this as an alternate component in the existing object and for this I need to implement an onReceive event to plug the incomin

Re: [Lazarus] Lazarus implementation of TListView etc?

2015-10-21 Thread Michael Schnell
On 10/20/2015 07:06 PM, Bo Berglund wrote: My program is a pretty simple command line program Description of TListview: " Use TListView to manage and display a list of items in a form" As a command line application does not have a form, this can't work. -Michael -- __

Re: [Lazarus] TInetSocket usage - any documentation available?

2015-10-21 Thread Mark Morgan Lloyd
Bo Berglund wrote: And it looks more complete, there is a chat example which implements a bidirectional system using a thread too. I will try to stuff this into the existing code if possible... As Mark Morgan Lloyd has pointed out I *really* need to create an encapsulated class for the TCPIP co

[Lazarus] JCF lose cursor position

2015-10-21 Thread Aradeonas
Hi, As you probably know when JCF formats the code sometimes it will lose cursor position and will jump to somewhere else and so I should scroll back to where was I. Is there any way to solve it or should I report it as a bug? Regards, Ara -- http://www.fastmail.com - The way an email service s