Re: [fpc-pascal] Incorrect Process startup

2016-11-07 Thread Steve Gatenby
Thanks Ewald - will follow this up - much appreciated On 08/11/16 07:40, Ewald wrote: On 06/11/16 23:50, Steve Gatenby wrote: run wmctrl (or other) from the TProcess / RunCommand code the TProcess instance returns the PID for the new process read the relevant file under /proc/PID/status

[fpc-pascal] Incorrect Process startup

2016-11-06 Thread Steve Gatenby
Intermittantly (but consistantly), my app will run the wrong process using either TAsyncProcess or RunCommand. I understand it will be my bug, just looking for a clue :) The 'Run' function is within a fpc library. A loop calls the 'Run' function each second to run a system process (eg ls or

Re: [fpc-pascal] Catching Exceptions in Library

2014-11-07 Thread Steve Gatenby
On 07/11/14 17:13, Sven Barth wrote: On 07.11.2014 01:39, Steve Gatenby wrote: Could anybody tell me why the following error is caught by the try except in an Application, but not in a Library ? I am needing to find out where try except doesn't do what I think, not fix this code

[fpc-pascal] Catching Exceptions in Library

2014-11-06 Thread Steve Gatenby
Could anybody tell me why the following error is caught by the try except in an Application, but not in a Library ? I am needing to find out where try except doesn't do what I think, not fix this code. this is a contrived error to show the problem, not part of my code :) procedure Test();

Re: [fpc-pascal] Catching Exceptions in Library

2014-11-06 Thread Steve Gatenby
On 07/11/14 12:04, waldo kitty wrote: On 11/6/2014 7:39 PM, Steve Gatenby wrote: Could anybody tell me why the following error is caught by the try except in an Application, but not in a Library ? I am needing to find out where try except doesn't do what I think, not fix this code

[fpc-pascal] Unhandled Exception

2014-09-08 Thread Steve Gatenby
I have an intermittant exception in my Lazarus app (Access violation) My app also uses a freepascal library - I think the problem is within it Can anybody suggest the best way to narrow this down to a unit / function / line ? I believe I have the Frame stack captured, but have no idea what to

Re: [fpc-pascal] Unhandled Exception

2014-09-08 Thread Steve Gatenby
On 09/09/14 11:44, Dennis Poon wrote: Steve Gatenby wrote: I have an intermittant exception in my Lazarus app (Access violation) My app also uses a freepascal library - I think the problem is within it Can anybody suggest the best way to narrow this down to a unit / function / line ? I

[fpc-pascal] SetLength procedure

2014-07-27 Thread Steve Gatenby
Could anybody enlighten me on how to make the 'SetLength' procedure into an equivalent function I have many instances of SetLength(xxx, Length(xxx)+1); Num := High(xxx); I would like to have Num := SetLength(xxx, Length(xxx)+1); or even something like Num := IncLength(xxx, 1); These are

Re: [fpc-pascal] SetLength procedure

2014-07-27 Thread Steve Gatenby
- SteveG On 27/07/14 20:09, Jürgen Hestermann wrote: Am 2014-07-27 12:10, schrieb Steve Gatenby: Could anybody enlighten me on how to make the 'SetLength' procedure into an equivalent function I have many instances of SetLength(xxx, Length(xxx)+1); Num := High(xxx); What

Re: [fpc-pascal] SetLength procedure

2014-07-27 Thread Steve Gatenby
Thanks for that - I will give it a try :) On 27/07/14 21:21, leledumbo wrote: It is only a personal preference, not a serious problem. I would find code in the form of ArrayLen := IncLength(ArrayName, 1); to be much more readable then SetLength(ArrayName, Length(ArrayName)+1);