Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-02

If TProcess.CommandLine is deprecated...

20 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrew Brunner
to William Oliveira Ferreira

You can use

*.Parameters.Text:='Parm1 Param2'
*.Parameters.DelimitedText:='Parm1=1 Param2=2'

2012/2/6 William Oliveira Ferreira :

Show quoted text 13 lines
If TProcess.CommandLine is deprecated... ...what should i use instead? ________________________________ William de Oliveira Ferreira Bacharel em Sistemas de Informa??o -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Unknown author
to Andrew Brunner
Andrew Brunner wrote
You can use *.Parameters.Text:='Parm1 Param2' *.Parameters.DelimitedText:='Parm1=1 Param2=2'
Or better yet
Parameters.Add('Parm1');
Parameters.Add('Parm2');

and of course, use Executable to indicate the binary.

All this is documented and explained in:

http://www.freepascal.org/docs-html/fcl/process/tprocess.commandline.html

Michael.

Show quoted text 23 lines
2012/2/6 William Oliveira Ferreira : > If TProcess.CommandLine is deprecated... > > ...what should i use instead? > ________________________________ > William de Oliveira Ferreira > Bacharel em Sistemas de Informa??o > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
William Oliveira Ferreira
to Unknown author

thanks!
________________________________
William de Oliveira Ferreira
Bacharel em Sistemas de Informa??o

2012/2/7

Show quoted text 56 lines
On Mon, 6 Feb 2012, Andrew Brunner wrote: You can use > > *.Parameters.Text:='Parm1 Param2' > *.Parameters.DelimitedText:='**Parm1=1 Param2=2' > Or better yet Parameters.Add('Parm1'); Parameters.Add('Parm2'); and of course, use Executable to indicate the binary. All this is documented and explained in: http://www.freepascal.org/**docs-html/fcl/process/** tprocess.commandline.html<http://www.freepascal.org/docs-html/fcl/process/tprocess.commandline.html> Michael. > > 2012/2/6 William Oliveira Ferreira : > >> If TProcess.CommandLine is deprecated... >> >> ...what should i use instead? >> ______________________________**__ >> William de Oliveira Ferreira >> Bacharel em Sistemas de Informa??o >> >> -- >> ______________________________**_________________ >> Lazarus mailing list >> .**freepascal.org >> http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus> >> >> > -- > ______________________________**_________________ > Lazarus mailing list > .**freepascal.org > http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus> > -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120207/3ce4592d/attachment-0001.html>

Bernd
to Unknown author: Or better yet Parameters.Add('Parm1'); Parameters.Add('Parm2'); and of course, use…

2012/2/7 :

Oh, this must be new. It seems I need a fresh set of .chm files. (Just this weekend I stumbled over the same question and did not find it in the help and also no helpful comments inside the TProcess source code.

(btw: the source code was the first place I intuitively hoped to find an answer, a short comment behind the "deprecated" keyword, but there is nothing)

William Oliveira Ferreira
to Bernd

I agree that a comment in front of the deprecated would be good to the uninformed as me, but I also do not want to seem boring. I wish developers would focus on tools for debugging, but follow the road map and I see good things to come.

//translated with help of google translator
________________________________
William de Oliveira Ferreira
Bacharel em Sistemas de Informa??o

2012/2/7 Bernd

Show quoted text 21 lines
2012/2/7 : > All this is documented and explained in: > > http://www.freepascal.org/docs-html/fcl/process/tprocess.commandline.html Oh, this must be new. It seems I need a fresh set of .chm files. (Just this weekend I stumbled over the same question and did not find it in the help and also no helpful comments inside the TProcess source code. (btw: the source code was the first place I intuitively hoped to find an answer, a short comment behind the "deprecated" keyword, but there is nothing) -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120208/2638b96e/attachment-0001.html>

Sven Barth
to William Oliveira Ferreira
William Oliveira Ferreira wrote
I agree that a comment in front of the deprecated would be good to the uninformed as me, but I also do not want to seem boring. I wish developers would focus on tools for debugging, but follow the road map and I see good things to come.

A comment in front of the deprecated won't be good, but a string behind the deprecated would be nice ;) (for the reason see below)

=== example begin ===

program deprecatedtest;
type
   TTest = class
     fFoo: String;
     property Foo: String read fFoo; deprecated 'I''m not needed anymore';
   end;
var
   t: TTest;
begin
   t := TTest.Create;
   Writeln(t.Foo);
end.

=== example end ===

=== output begin ===

PS P:\tests\oneshots> fpc .\deprecatedtest.pas
Free Pascal Compiler version 2.6.0 [2011/12/25] for i386 Copyright (c) 1993-2011 by Florian Klaempfl and others Target OS: Win32 for i386
Compiling .\deprecatedtest.pas
deprecatedtest.pas(15,13) Warning: Symbol "Foo" is deprecated: "I'm not needed anymore"
Linking deprecatedtest.exe
16 lines compiled, 0.1 sec , 28608 bytes code, 1964 bytes data 1 warning(s) issued

=== output end ===

Regards,
Sven

Everton Vieira
to Sven Barth

How about in the SetCommandLine, of the property CommandLine he does the split between exename and parameters. By this, the two options could be available. Of course, who puts a parameter with space and not set the " " will deal with some error, which is good to learn. About that, could be created some manner to offer hints and tips on code editor in how about to use de elements of the class. It's will be very good documentation and also very good IDE behavior.

Sven Barth wrote 49 lines
Am 08.02.2012 04:23, schrieb William Oliveira Ferreira: > I agree that a comment in front of the deprecated would be good to the > uninformed as me, but I also do not want to seem boring. I wish > developers would focus on tools for debugging, but follow the road map > and I see good things to come. A comment in front of the deprecated won't be good, but a string behind the deprecated would be nice ;) (for the reason see below) === example begin === program deprecatedtest; type TTest = class fFoo: String; property Foo: String read fFoo; deprecated 'I''m not needed anymore'; end; var t: TTest; begin t := TTest.Create; Writeln(t.Foo); end. === example end === === output begin === PS P:\tests\oneshots> fpc .\deprecatedtest.pas Free Pascal Compiler version 2.6.0 [2011/12/25] for i386 Copyright (c) 1993-2011 by Florian Klaempfl and others Target OS: Win32 for i386 Compiling .\deprecatedtest.pas deprecatedtest.pas(15,13) Warning: Symbol "Foo" is deprecated: "I'm not needed anymore" Linking deprecatedtest.exe 16 lines compiled, 0.1 sec , 28608 bytes code, 1964 bytes data 1 warning(s) issued === output end === Regards, Sven -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
William Oliveira Ferreira
to Sven Barth: A comment in front of the deprecated won't be good, but a string behind the deprecated…

you told correclty what i was trying to say wrongly.... =) ________________________________
William de Oliveira Ferreira
Bacharel em Sistemas de Informa??o

2012/2/8 Sven Barth

Show quoted text 55 lines
Am 08.02.2012 04:23, schrieb William Oliveira Ferreira: I agree that a comment in front of the deprecated would be good to the > uninformed as me, but I also do not want to seem boring. I wish > developers would focus on tools for debugging, but follow the road map > and I see good things to come. > A comment in front of the deprecated won't be good, but a string behind the deprecated would be nice ;) (for the reason see below) === example begin === program deprecatedtest; type TTest = class fFoo: String; property Foo: String read fFoo; deprecated 'I''m not needed anymore'; end; var t: TTest; begin t := TTest.Create; Writeln(t.Foo); end. === example end === === output begin === PS P:\tests\oneshots> fpc .\deprecatedtest.pas Free Pascal Compiler version 2.6.0 [2011/12/25] for i386 Copyright (c) 1993-2011 by Florian Klaempfl and others Target OS: Win32 for i386 Compiling .\deprecatedtest.pas deprecatedtest.pas(15,13) Warning: Symbol "Foo" is deprecated: "I'm not needed anymore" Linking deprecatedtest.exe 16 lines compiled, 0.1 sec , 28608 bytes code, 1964 bytes data 1 warning(s) issued === output end === Regards, Sven -- ______________________________**_________________ Lazarus mailing list .**freepascal.org http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120208/1a7f75cc/attachment.html>

Everton Vieira
to William Oliveira Ferreira

The concept of deprecated is that is not needed anymore so tell that doesn't help much.

William Oliveira Ferreira wrote 64 lines
you told correclty what i was trying to say wrongly.... =) ________________________________ William de Oliveira Ferreira Bacharel em Sistemas de Informa??o 2012/2/8 Sven Barth Am 08.02.2012 04:23, schrieb William Oliveira Ferreira: I agree that a comment in front of the deprecated would be good to the uninformed as me, but I also do not want to seem boring. I wish developers would focus on tools for debugging, but follow the road map and I see good things to come. A comment in front of the deprecated won't be good, but a string behind the deprecated would be nice ;) (for the reason see below) === example begin === program deprecatedtest; type TTest = class fFoo: String; property Foo: String read fFoo; deprecated 'I''m not needed anymore'; end; var t: TTest; begin t := TTest.Create; Writeln(t.Foo); end. === example end === === output begin === PS P:\tests\oneshots> fpc .\deprecatedtest.pas Free Pascal Compiler version 2.6.0 [2011/12/25] for i386 Copyright (c) 1993-2011 by Florian Klaempfl and others Target OS: Win32 for i386 Compiling .\deprecatedtest.pas deprecatedtest.pas(15,13) Warning: Symbol "Foo" is deprecated: "I'm not needed anymore" Linking deprecatedtest.exe 16 lines compiled, 0.1 sec , 28608 bytes code, 1964 bytes data 1 warning(s) issued === output end === Regards, Sven -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120208/10d7b67a/attachment-0001.html>

William Oliveira Ferreira
to Everton Vieira

well, so i'll gonna be mor clear:
just say that a property or function is deprecated without take a hint of what should be better used is obscure. just a hint of what should be used i'll help a lot..
________________________________
William de Oliveira Ferreira
Bacharel em Sistemas de Informa??o

2012/2/8 Everton Vieira

Show quoted text 85 lines
The concept of deprecated is that is not needed anymore so tell that doesn't help much. Em 08/02/2012, ?s 09:52, William Oliveira Ferreira escreveu: you told correclty what i was trying to say wrongly.... =) ________________________________ William de Oliveira Ferreira Bacharel em Sistemas de Informa??o 2012/2/8 Sven Barth > Am 08.02.2012 04:23, schrieb William Oliveira Ferreira: > > I agree that a comment in front of the deprecated would be good to the >> uninformed as me, but I also do not want to seem boring. I wish >> developers would focus on tools for debugging, but follow the road map >> and I see good things to come. >> > > A comment in front of the deprecated won't be good, but a string behind > the deprecated would be nice ;) (for the reason see below) > > === example begin === > > program deprecatedtest; > > type > TTest = class > fFoo: String; > property Foo: String read fFoo; deprecated 'I''m not needed anymore'; > end; > > var > t: TTest; > begin > t := TTest.Create; > Writeln(t.Foo); > end. > > === example end === > > === output begin === > > PS P:\tests\oneshots> fpc .\deprecatedtest.pas > Free Pascal Compiler version 2.6.0 [2011/12/25] for i386 > Copyright (c) 1993-2011 by Florian Klaempfl and others > Target OS: Win32 for i386 > Compiling .\deprecatedtest.pas > deprecatedtest.pas(15,13) Warning: Symbol "Foo" is deprecated: "I'm not > needed anymore" > Linking deprecatedtest.exe > 16 lines compiled, 0.1 sec , 28608 bytes code, 1964 bytes data > 1 warning(s) issued > > === output end === > > Regards, > Sven > > > -- > ______________________________**_________________ > Lazarus mailing list > .**freepascal.org > http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus> > -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120208/ba1f9b67/attachment.html>

Everton Vieira
to William Oliveira Ferreira

That's true, if the procedure is really deprecated, then the question is what use instead.

William Oliveira Ferreira wrote 91 lines
well, so i'll gonna be mor clear: just say that a property or function is deprecated without take a hint of what should be better used is obscure. just a hint of what should be used i'll help a lot.. ________________________________ William de Oliveira Ferreira Bacharel em Sistemas de Informa??o 2012/2/8 Everton Vieira The concept of deprecated is that is not needed anymore so tell that doesn't help much. Em 08/02/2012, ?s 09:52, William Oliveira Ferreira escreveu: > you told correclty what i was trying to say wrongly.... =) > ________________________________ > William de Oliveira Ferreira > Bacharel em Sistemas de Informa??o > > > 2012/2/8 Sven Barth > Am 08.02.2012 04:23, schrieb William Oliveira Ferreira: > > I agree that a comment in front of the deprecated would be good to the > uninformed as me, but I also do not want to seem boring. I wish > developers would focus on tools for debugging, but follow the road map > and I see good things to come. > > A comment in front of the deprecated won't be good, but a string behind the deprecated would be nice ;) (for the reason see below) > > === example begin === > > program deprecatedtest; > > type > TTest = class > fFoo: String; > property Foo: String read fFoo; deprecated 'I''m not needed anymore'; > end; > > var > t: TTest; > begin > t := TTest.Create; > Writeln(t.Foo); > end. > > === example end === > > === output begin === > > PS P:\tests\oneshots> fpc .\deprecatedtest.pas > Free Pascal Compiler version 2.6.0 [2011/12/25] for i386 > Copyright (c) 1993-2011 by Florian Klaempfl and others > Target OS: Win32 for i386 > Compiling .\deprecatedtest.pas > deprecatedtest.pas(15,13) Warning: Symbol "Foo" is deprecated: "I'm not needed anymore" > Linking deprecatedtest.exe > 16 lines compiled, 0.1 sec , 28608 bytes code, 1964 bytes data > 1 warning(s) issued > > === output end === > > Regards, > Sven > > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120208/c4ff6c16/attachment.html>

Everton Vieira
to Sven Barth

Yeah, the documentation of it, are very good.

Please, answer a silly question of mine, the deprecated functions are dropped?

Sven Barth wrote 16 lines
Am 08.02.2012 13:50, schrieb Everton Vieira: > That's true, if the procedure is really deprecated, then the question is > what use instead. > In case of TProcess.CommandLine it's mentioned here: http://www.freepascal.org/docs-html/fcl/process/tprocess.commandline.html (though it could have been mentioned in the deprecated message as well...) Regards, Sven -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Sven Barth
to Everton Vieira
Everton Vieira wrote
Yeah, the documentation of it, are very good. Please, answer a silly question of mine, the deprecated functions are dropped?

That should be the long term goal. As the deprecated for that property was introduced for 2.6.0 it might be that they'll be removed in 2.8.0... (not in 2.6.2 or 2.6.4 for sure though).

Regards,
Sven

Show quoted text 26 lines
Em 08/02/2012, ?s 11:01, Sven Barth escreveu: > Am 08.02.2012 13:50, schrieb Everton Vieira: >> That's true, if the procedure is really deprecated, then the question is >> what use instead. >> > > In case of TProcess.CommandLine it's mentioned here: http://www.freepascal.org/docs-html/fcl/process/tprocess.commandline.html > (though it could have been mentioned in the deprecated message as well...) > > Regards, > Sven > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Everton Vieira
to Sven Barth

Make sense. Thanks.

But the previous idea of show the net development of the documentation with examples and tips of use it in the IDE is very good. The help of the delphi was always good, i remember the early days that i`ve successfully used.

And the idea of keep multiple functionalities with different behaviors is also good, the problem in that is the rain of question that could came, and the solution of it is an good IDE help. And as an open source project the net development of the documentation should be include in the that help.

Sven Barth wrote 43 lines
Am 08.02.2012 14:09, schrieb Everton Vieira: > Yeah, the documentation of it, are very good. > > Please, answer a silly question of mine, the deprecated functions are dropped? That should be the long term goal. As the deprecated for that property was introduced for 2.6.0 it might be that they'll be removed in 2.8.0... (not in 2.6.2 or 2.6.4 for sure though). Regards, Sven > > Em 08/02/2012, ?s 11:01, Sven Barth escreveu: > >> Am 08.02.2012 13:50, schrieb Everton Vieira: >>> That's true, if the procedure is really deprecated, then the question is >>> what use instead. >>> >> >> In case of TProcess.CommandLine it's mentioned here: http://www.freepascal.org/docs-html/fcl/process/tprocess.commandline.html >> (though it could have been mentioned in the deprecated message as well...) >> >> Regards, >> Sven >> >> -- >> _______________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
William Oliveira Ferreira
to Hans-Peter Diettrich

well, i think it shoundn't but when we find these mistakes, it normal that someone starts to question...
________________________________
William de Oliveira Ferreira
Bacharel em Sistemas de Informa??o

2012/2/8 Hans-Peter Diettrich

Show quoted text 20 lines
William Oliveira Ferreira schrieb: well, so i'll gonna be mor clear: > just say that a property or function is deprecated without take a hint of > what should be better used is obscure. just a hint of what should be used > i'll help a lot.. > I wonder why such *obvious* things deserve any discussion ;-) DoDi -- ______________________________**_________________ Lazarus mailing list .**freepascal.org http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120208/dc817155/attachment.html>

Marco van de Voort
to Sven Barth: A comment in front of the deprecated won't be good, but a string behind the deprecated…
Sven Barth wrote 5 lines
> developers would focus on tools for debugging, but follow the road map > and I see good things to come. A comment in front of the deprecated won't be good, but a string behind the deprecated would be nice ;) (for the reason see below)

2.6.0 must be compilable with 2.4.4.

So the fact that 2.6.0 compiles messages to "deprecated" (*) only has an effect on 2.6.2 and beyond.

(*) and in reality, the docs tool must survive it also.
Sven Barth
to Marco van de Voort
Marco van de Voort wrote 10 lines
On Wed, Feb 08, 2012 at 11:36:05AM +0100, Sven Barth wrote: >> developers would focus on tools for debugging, but follow the road map >> and I see good things to come. > > A comment in front of the deprecated won't be good, but a string behind > the deprecated would be nice ;) (for the reason see below) 2.6.0 must be compilable with 2.4.4. So the fact that 2.6.0 compiles messages to "deprecated" (*) only has an effect on 2.6.2 and beyond.

Right... I forgot about that (though one could have added a compiler condition around the message - which does not mean that you should have done that!)

(*) and in reality, the docs tool must survive it also.

That is indeed also important :)

Regards,
Sven