Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Jesus Reyes A.
On Tue, 08 Mar 2016 08:01:10 -0600, Ondrej Pokorny wrote: On 08.03.2016 14:15, Michael Van Canneyt wrote: Well. You take yourself as a reference I think. I don't think Jesus' idea wasn't really serious :) Partly... I was aware there is no support in Lazarus for something like this.

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Ondrej Pokorny
On 08.03.2016 15:51, Vojtěch Čihák wrote: Thanks, it's a nice idea. I think that selecting in listbox by arrow keys is annoying and slow. i would rather use RadioGroup where the option can be selected faster by Alt+Key. Done, I did even better. You don't need Alt+Key, just Key. Ondrej --

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Ondrej Pokorny
On 08.03.2016 16:00, Michael Van Canneyt wrote: Great. No more wishes from me then. Good job ! :-) Done in r51859, thanks. Ondrej -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/l

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Michael Van Canneyt
On Tue, 8 Mar 2016, Reimar Grabowski wrote: On Tue, 8 Mar 2016 14:15:23 +0100 (CET) Michael Van Canneyt wrote: Well. You take yourself as a reference I think. When you called it very confusing... ... you were speaking on behalf of humanity? ... you stated an objective fact? ... you stated

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Reimar Grabowski
On Tue, 8 Mar 2016 14:15:23 +0100 (CET) Michael Van Canneyt wrote: > Well. You take yourself as a reference I think. When you called it very confusing... ... you were speaking on behalf of humanity? ... you stated an objective fact? ... you stated your personal opinion and only forgot to make cle

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Ondrej Pokorny
On 08.03.2016 15:51, Michael Van Canneyt wrote: I introduced the ctrl+shift+x shortcut for the "interactive Code Completion" (class code create). Aha. This was not clear to me ? Just read the very first email from this thread :) So would it be correct to say that ctrl-shift-x = ctrl-shif

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Michael Van Canneyt
On Tue, 8 Mar 2016, Ondrej Pokorny wrote: On 08.03.2016 15:51, Michael Van Canneyt wrote: I introduced the ctrl+shift+x shortcut for the "interactive Code Completion" (class code create). Aha. This was not clear to me ? Just read the very first email from this thread :) So would it be

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Ondrej Pokorny
Yep, will do. Ondrej On 08.03.2016 15:51, Vojtěch Čihák wrote: Thanks, it's a nice idea. I think that selecting in listbox by arrow keys is annoying and slow. i would rather use RadioGroup where the option can be selected faster by Alt+Key. V. -- __

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Vojtěch Čihák
Datum: 07.03.2016 21:26 Předmět: [Lazarus] Ann: class code creation I implemented "class code creation" in r51851. I was already tired of creating/copying object variables by hand. The idea is the same as with code creation (ctrl+shift+c), but the variable is created in one of the class sect

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Michael Van Canneyt
On Tue, 8 Mar 2016, Ondrej Pokorny wrote: On 08.03.2016 15:07, Mattias Gaertner wrote: ctrl-shift-x -> ctrl-shift-alt-x >ctrl-shift-space -> ctrl-shift-alt-space >etc. > >(btw those are some ugly short-cuts) Code completion is ctrl+shift+c. I thought Michael's X was a typo or placeholder.

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Ondrej Pokorny
On 08.03.2016 15:20, Mattias Gaertner wrote: For example the interactive completion on a property could give options to add Getter, Setter or add code for an array property. Yes, this is also a valid enhancement. In the dialog there could be an option to create a "property x: Integer read Fx/G

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Ondrej Pokorny
On 08.03.2016 15:07, Mattias Gaertner wrote: ctrl-shift-x -> ctrl-shift-alt-x >ctrl-shift-space -> ctrl-shift-alt-space >etc. > >(btw those are some ugly short-cuts) Code completion is ctrl+shift+c. I thought Michael's X was a typo or placeholder. I introduced the ctrl+shift+x shortcut for the

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Mattias Gaertner
On Tue, 8 Mar 2016 15:01:10 +0100 Ondrej Pokorny wrote: >[...]To reduce confusion I can enhance the > dialog with a local/class target combobox - people could than map the > more interactive shortcut to ctrl+shift+c and use only one shortcut for > both class/local target if they want. What do

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Mattias Gaertner
On Tue, 8 Mar 2016 14:05:18 +0100 Reimar Grabowski wrote: >[...] > > > Then better 2 shortcut keys: > > > ctrl-shift-X = create using default set in options. > > > ctrl-alt-X or ctrl-shift-alt-X = create and force dialog. > > > Or something similar. >[...] > ctrl-shift-x -> ctrl-shift-alt-x > c

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Ondrej Pokorny
On 08.03.2016 14:15, Michael Van Canneyt wrote: Well. You take yourself as a reference I think. I don't think Jesus' idea wasn't really serious :) Some contra's: 1.) Lazarus IDE doesn't have an API for that. I don't think anybody has time/will to make it - it could be pretty/unnecessarily com

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Michael Van Canneyt
On Tue, 8 Mar 2016, Reimar Grabowski wrote: On Tue, 8 Mar 2016 10:13:22 +0100 Mattias Gaertner wrote: On Tue, 8 Mar 2016 09:49:45 +0100 (CET) Michael Van Canneyt wrote: [...] No, this kind of behaviour is very confusing for me. See, fixed that for you. Because at least I and Jesus do n

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Reimar Grabowski
On Tue, 8 Mar 2016 10:13:22 +0100 Mattias Gaertner wrote: > On Tue, 8 Mar 2016 09:49:45 +0100 (CET) > Michael Van Canneyt wrote: > > >[...] > > No, this kind of behaviour is very confusing for me. See, fixed that for you. Because at least I and Jesus do not think so. It is common behavior on t

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Mattias Gaertner
On Tue, 8 Mar 2016 09:49:45 +0100 (CET) Michael Van Canneyt wrote: >[...] > No, this kind of behaviour is very confusing. Then better 2 shortcut keys: > ctrl-shift-X = create using default set in options. > ctrl-alt-X or ctrl-shift-alt-X = create and force dialog. > Or something similar. +1 One

Re: [Lazarus] Ann: class code creation

2016-03-08 Thread Michael Van Canneyt
On Mon, 7 Mar 2016, Jesus Reyes A. wrote: En Mon, 07 Mar 2016 21:21:03 -0600, Ondrej Pokorny escribió: I don't think this is possible or reasonable. On 08.03.2016 2:39, Dmitry Boyarintsev wrote: procedure TClass.Test(y: integer); begin x private|:= y; end; One problem is that CodeTool

Re: [Lazarus] Ann: class code creation

2016-03-07 Thread Jesus Reyes A.
En Mon, 07 Mar 2016 21:21:03 -0600, Ondrej Pokorny escribió: I don't think this is possible or reasonable. On 08.03.2016 2:39, Dmitry Boyarintsev wrote: procedure TClass.Test(y: integer); begin x private|:= y; end; One problem is that CodeTools need valid syntax in front of y to evalu

Re: [Lazarus] Ann: class code creation

2016-03-07 Thread Ondrej Pokorny
On 08.03.2016 2:29, Luiz Americo Pereira Camara wrote: In the dialog title, i suggest to replace "variable" by "field" Will do! Ondrej -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listi

Re: [Lazarus] Ann: class code creation

2016-03-07 Thread Ondrej Pokorny
I don't think this is possible or reasonable. On 08.03.2016 2:39, Dmitry Boyarintsev wrote: procedure TClass.Test(y: integer); begin x private|:= y; end; One problem is that CodeTools need valid syntax in front of y to evaluate the type of y correctly (the type that x gets). Eventually p

Re: [Lazarus] Ann: class code creation

2016-03-07 Thread Dmitry Boyarintsev
On Mon, Mar 7, 2016 at 3:25 PM, Ondrej Pokorny wrote: > I implemented "class code creation" in r51851. I was already tired of > creating/copying object variables by hand. The idea is the same as with > code creation (ctrl+shift+c), but the variable is created in one of the > class section: > > pr

Re: [Lazarus] Ann: class code creation

2016-03-07 Thread Luiz Americo Pereira Camara
2016-03-07 17:25 GMT-03:00 Ondrej Pokorny : > > > Hit Ctrl+Shift+X on the undeclared variable x and you get a dialog: > Thanks for the work In the dialog title, i suggest to replace "variable" by "field" Luiz -- ___ Lazarus mailing list Lazarus@lists.

Re: [Lazarus] Ann: class code creation

2016-03-07 Thread Michael Van Canneyt
On Mon, 7 Mar 2016, Ondrej Pokorny wrote: I implemented "class code creation" in r51851. I was already tired of creating/copying object variables by hand. The idea is the same as with code creation (ctrl+shift+c), but the variable is created in one of the class section: Nice, that will com

[Lazarus] Ann: class code creation

2016-03-07 Thread Ondrej Pokorny
I implemented "class code creation" in r51851. I was already tired of creating/copying object variables by hand. The idea is the same as with code creation (ctrl+shift+c), but the variable is created in one of the class section: unit Unit1; {$mode objfpc}{$H+} interface type TClass = clas