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 - it will intermittently
show the new process is actually a copy of the caller app.
(meaning: the orig app is called Test1, I try to run wmctrl, I end up
with 2 copies of Test1 running)


Actually, this is quite exactly what I would expect here. Spawning a new
process on unix is actually a two step thingie:
- First fork(), which duplicates the current process
- The child then exec()'s, replacing its current process image
  with a new one (which would be the target executable in your
  case)

It is important to note that a lot of the parent process is preserved by
the child process. On such example are file descriptors, which are not
closed automatically for you. It is actually via this mechanism that
pipes to and from child processes can be established with relative ease.

More on this subject can be found at
https://en.wikipedia.org/wiki/Fork%E2%80%93exec
https://linux.die.net/man/2/clone
https://linux.die.net/man/2/fork
https://linux.die.net/man/3/exec


I have found through experimenting:

a pause of 100ms after running the process will fix 80% of cases.


Probably because the child has exec'ed by this time, if I had to guess.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FreeBSD distro with fpc as star.

2016-11-07 Thread Lars
On Mon, November 7, 2016 2:48 am, Michael Schnell wrote:
> I understand that you suggest you can't build the Lazarus IDE with
> defining  fpGUI or CustomDrwan  instead of Qt or Gnome (or Windows or
> Cocos).
>
>

Does lazarus even know about fpGUI I thought fpgui was never a part of
lazarus.. did someone use fpgui with lazarus?

Or you were mistaken to think fpGUI was an option in lazarus?

Sorry I don't know myself, I'm not up to date on these things

I always remembered fpgui as a non visual development that was separate
and never integrated in any way with lazarus widget set. Did this change?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FreeBSD distro with fpc as star.

2016-11-07 Thread fredvs
> I understand that you suggest you can't build the Lazarus IDE with defining 
fpGUI or CustomDrwan  instead of Qt or Gnome (or Windows or Cocos). 

Maybe I did not understand well.

AFAIK, for Unix os, Lazarus and LCL-widget-set need a "big native"
widget-set, like GTK, KDE or Qt.

IMO (maybe I am wrong) LCL is, to resume, a "Pascal Header" of GTK, KDE or
Qt widget-set C libraries.

In theory it is possible to build Lazarus with fpGUI-pure-X-widget-set but I
was never able to do it work.

Also IMO (maybe I am wrong too for this), even for CustomDraw, a "big
native·widget-set" is needed.

The polYdev "pure X" iso-cd is about 350 megas (with webbrowser-Opera, 5
different fpc, all video codec, audio+video player, ide, window-manager,
wine decoder, etc...).

Installing the Gnome or KDE packages will need +- 950 megas more !

Fre;D








-
Many thanks ;-)
--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/FreeBSD-distro-with-fpc-as-star-tp5722535p5726783.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] New Feature: "Management Operators"

2016-11-07 Thread African Wild Dog
Hello,

I saw on the bug tracker a patch submission by Maciej Izak about the
feature "Management Operators".

This feature is related to Automatic Reference Counting?

Regards
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FreeBSD distro with fpc as star.

2016-11-07 Thread Michael Schnell

On 05.11.2016 13:40, fredvs wrote:

Lazarus needs those big widgetsets. But if you install Qt or Gnome on
...


And, of course, fpGUI and MSEgui applications can run on a Gnome or Qt
system.
I understand that you suggest you can't build the Lazarus IDE with 
defining  fpGUI or CustomDrwan  instead of Qt or Gnome (or Windows or 
Cocos).


Is that correct ?

Is this due to solved ?

-Michael
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Incorrect Process startup

2016-11-07 Thread Ewald
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 - it will intermittently
> show the new process is actually a copy of the caller app.
> (meaning: the orig app is called Test1, I try to run wmctrl, I end up
> with 2 copies of Test1 running)

Actually, this is quite exactly what I would expect here. Spawning a new
process on unix is actually a two step thingie:
- First fork(), which duplicates the current process
- The child then exec()'s, replacing its current process image
  with a new one (which would be the target executable in your
  case)

It is important to note that a lot of the parent process is preserved by
the child process. On such example are file descriptors, which are not
closed automatically for you. It is actually via this mechanism that
pipes to and from child processes can be established with relative ease.

More on this subject can be found at
https://en.wikipedia.org/wiki/Fork%E2%80%93exec
https://linux.die.net/man/2/clone
https://linux.die.net/man/2/fork
https://linux.die.net/man/3/exec

> I have found through experimenting:
> 
> a pause of 100ms after running the process will fix 80% of cases.

Probably because the child has exec'ed by this time, if I had to guess.


-- 
Ewald
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Generics and Scopes

2016-11-07 Thread Sven Barth
Am 07.11.2016 15:58 schrieb "African Wild Dog" :
> It is intended to change such compiler behavior in the future? It is
incompatible with Delphi and moreover it force us to break the
encapsulation of the Generic types.

I can't answer this without you providing an example that fails.

Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Blind Users

2016-11-07 Thread Graeme Geldenhuys
On 2016-11-07 15:40, wkitt...@windstream.net wrote:
> 
> typo!


You are 100% correct. Thanks for spotting that.


Regards,
  Graeme

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Blind Users

2016-11-07 Thread wkitty42

On 11/07/2016 09:51 AM, Graeme Geldenhuys wrote:

If you have Git installed (highly recommended), you can get fpGUI source
code from GitHub using the following command:

  git close https://github.com/graemeg/fpGUI.git


typo!

  git clone https://github.com/graemeg/fpGUI.git

--
 NOTE: No off-list assistance is given without prior approval.
   *Please keep mailing list traffic on the list* unless
   private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Generics and Scopes

2016-11-07 Thread Michael Van Canneyt



On Mon, 7 Nov 2016, African Wild Dog wrote:


Hello,

I have tried to compile some delphi projects using the latest FPC (3.0.0)
release, and i got several errors related to Ggenerics feature. Reading the
FPC documentation (section 8.8 - A Word About Scope) i have found that FPC
requires that all external types and procedures used in the the Generic
type implementation must be visible when the Generic type is specialized.

It is intended to change such compiler behavior in the future? It is
incompatible with Delphi and moreover it force us to break the
encapsulation of the Generic types.


It may well be that this part of the text is no longer valid. 
Sven Barth would need to look at it to see if it is still so.



Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Blind Users

2016-11-07 Thread Graeme Geldenhuys
On 2016-11-07 14:36, BobJ wrote:
> Is there any other location from which fpgui can be acquired?

Yes, fpGUI also has a mirror repository on GitHub. fpGUI is primarily
released in source code form. The only exception is the DocView tool and
INF help files, which I also release as compiled versions for convenience.

If you have Git installed (highly recommended), you can get fpGUI source
code from GitHub using the following command:

  git close https://github.com/graemeg/fpGUI.git

You will end up with a 'fpgui' directory and in the 'master' branch. If
you want the latest stable fpGUI code, then change directory into the
'fpgui' directory and checkout the 'maint' branch.

  cd fpgui
  git checkout maint

If you are interested in the latest features and currently less stable
version of fpGUI, then checkout the 'develop' branch.

  cd fpgui
  git checkout develop

I also recommend you read the docs/INSTALL.txt file to get started.

If you don't have Git installed, that's not a problem either, as Github
allows you to download ZIP archives of whichever branch you selected.
Here is a direct link to download the latest 'maint' branch source code.

  https://github.com/graemeg/fpGUI/archive/maint.zip



Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] Generics and Scopes

2016-11-07 Thread African Wild Dog
Hello,

I have tried to compile some delphi projects using the latest FPC (3.0.0)
release, and i got several errors related to Ggenerics feature. Reading the
FPC documentation (section 8.8 - A Word About Scope) i have found that FPC
requires that all external types and procedures used in the the Generic
type implementation must be visible when the Generic type is specialized.

It is intended to change such compiler behavior in the future? It is
incompatible with Delphi and moreover it force us to break the
encapsulation of the Generic types.

Best regards
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Variants - Auto-convert nulls

2016-11-07 Thread African Wild Dog
Hello,

I need the variant type converting automatically  null values to the
default value of the target type (e.g False for Booleans, 0 for
Integers/Floats).
I know that i can achieve this by setting the variable NullStrictConvert
(unit Variants) to False. However, this is a global setting and therefore
is not safe using such method.

What would be the best way to solve my problem?

Best regards
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Blind Users

2016-11-07 Thread BobJ

Graeme,

You included this on your message...> -- 

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


Is there any other location from which fpgui can be acquired?

sourceforge has never been friendly to screen-reading software and, although 
I have made multiple attempts with each of two screen-readers, I have been 
unable to get a download started.


BTW, what is the exact name of the downloadable file?

Thanks,

Bob



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC 3.0.2 Release Date

2016-11-07 Thread African Wild Dog
2016-08-19 4:22 GMT-03:00 Jonas Maebe :

> African Wild Dog wrote:
>
> > There are some critical bugs in fpc 3.0 which are already fixed. So, why
> > the 3.0.2 version was not released yet? Do you have any estimate about
> > when it will be released?
>
> My guess is that RC1 will be released between the end of August and mid
> September, and the final release somewhere in October


As we are already in November, do you have a new estimate?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] JSON Test Suite

2016-11-07 Thread Benito van der Zander


Hi,
huh, why does the build suddenly fail?

Well, FPC 3.0.0 does not have the joStrict option.
It is only there in 3.1.1.

Perhaps there should be two fpc parser entries.

Best,
Benito


On 06.11.2016 17:34, Benito van der Zander wrote:

Hi,

it is better to use TJSONParser than GetJSON.

GetJSON is defined as:

procedure DefJSONParserHandler(AStream: TStream; const AUseUTF8: 
Boolean; out

  Data: TJSONData);

Var
  P : TJSONParser;

begin
  Data:=Nil;
  P:=TJSONParser.Create(AStream,[joUTF8]);
  try
Data:=P.Parse;
  finally
P.Free;
  end;
end;

with

procedure DefJSONParserHandler(AStream: TStream; const AUseUTF8: 
Boolean; out

  Data: TJSONData);

Var
  P : TJSONParser;

begin
  Data:=Nil;
  P:=TJSONParser.Create(AStream,[*joStrict,*joUTF8]);
  try
Data:=P.Parse;
  finally
P.Free;
  end;
end;

it should pass more


Best,

Benito





___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal