Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Di., 24. Apr. 2018, 04:03: > > > > On Apr 24, 2018, at 12:57 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > As I said the problem arises when inheritance enters the field as the > rules are a bit different there. > > > > Why should helper

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Ryan Joseph
> On Apr 24, 2018, at 12:57 AM, Sven Barth via fpc-pascal > wrote: > > As I said the problem arises when inheritance enters the field as the rules > are a bit different there. > Why should helper methods be allowed to redefine existing methods anyways? As I mentioned Swift/ObjC don’t even

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Sven Barth via fpc-pascal
LacaK schrieb am Mo., 23. Apr. 2018, 15:22: > > > >> Is planned support for multiple class(objet, record) helpers in a way, >> that all class helpers can be used in parallel not only one? >> > > Yes, it is planned. Main problem currently (aside from time) is to define > when a method hides the m

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Ryan Joseph
> On Apr 23, 2018, at 8:22 PM, LacaK wrote: > > Later in uses clause wins ... as for other cases where in different units are > used same names > But probably problem is deeper , what I am not aware of ;-) Swift just gives a compiler error if there is a redefinition of method in the current

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Ryan Joseph
> On Apr 23, 2018, at 7:13 PM, Sven Barth via fpc-pascal > wrote: > > Yes, it is planned. Main problem currently (aside from time) is to define > when a method hides the method of another helper, especially when inheritance > (both for the helper and the extended type) is involved. > Prob

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread LacaK
Is planned support for multiple class(objet, record) helpers in a way, that all class helpers can be used in parallel not only one? Yes, it is planned. Main problem currently (aside from time) is to define when a method hides the method of another helper, especially when inher

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Michael Van Canneyt
On Mon, 23 Apr 2018, Marco van de Voort wrote: In our previous episode, Maciej Izak said: full potential of class/record/type helpers is not used :), and by bad choice can be loses for ever. IMO The best direction for type helpers (which can solve all problems) is usage "with" for example:

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Marco van de Voort
In our previous episode, Maciej Izak said: > > full potential of class/record/type helpers is not used :), and by bad > choice can be loses for ever. IMO The best direction for type helpers > (which can solve all problems) is usage "with" for example: > > var > x: TObjectA with THelper1, THelpe

Re: [fpc-pascal] Read comments via fcl-passrc

2018-04-23 Thread Michael Fuchs
Am 23.04.2018 um 13:39 schrieb Michael Van Canneyt: >> Can I save the comments in the DocComment property of every element or >> is this used somewhere else? > > It's normally not used; The idea is to use this in a pasdoc->fpdoc > converter. Great, then I will capture it for my project. Thanks.

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Maciej Izak
2018-04-23 14:21 GMT+02:00 Mattias Gaertner : > How will this be activated? > A modeswitch? > Will it be default enabled in mode objfpc and disabled in mode delphi? > There was discussion about this while ago... and there was a lot of problems. IMO the best option to solve all problems, is expan

Re: [fpc-pascal] Read comments via fcl-passrc

2018-04-23 Thread Michalis Kamburelis
Michael Van Canneyt wrote: > > > On Mon, 23 Apr 2018, Michael Fuchs wrote: > > > Am 23.04.2018 um 12:43 schrieb Mattias Gaertner: > >>> I found TPasTreeContainer.NeedComments but it does nothing. > >> > >> Set that to true. Then create the parser. > > > > Ok, so I can not use the function ParseSo

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Mattias Gaertner
On Mon, 23 Apr 2018 12:13:01 + Sven Barth via fpc-pascal wrote: > LacaK schrieb am Mo., 23. Apr. 2018, 13:34: > > > Hi , > > > > I am sure that this was already discussed, but I can not find any > > conclusion. > > > > Is planned support for multiple class(objet, record) helpers in a way, >

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Maciej Izak
2018-04-23 14:02 GMT+02:00 LacaK : > Can you give small example for my use case ? I can not understand from > above mentioned examples. > unit A; type TClassA = class public procedure Method1; end; unit B; type TClassAHelper1 = record private instance: T default; public pr

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Sven Barth via fpc-pascal
LacaK schrieb am Mo., 23. Apr. 2018, 13:34: > Hi , > > I am sure that this was already discussed, but I can not find any > conclusion. > > Is planned support for multiple class(objet, record) helpers in a way, > that all class helpers can be used in parallel not only one? > Yes, it is planned.

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread LacaK
Dňa 23.4.2018 o 13:52 Maciej Izak napísal(a): 2018-04-23 13:45 GMT+02:00 Maciej Izak >: https://github.com/maciej-izak/PascalSmartPointers/tree/master/examples small mistake, this is

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Maciej Izak
2018-04-23 13:45 GMT+02:00 Maciej Izak : > https://github.com/maciej-izak/PascalSmartPointers/tree/master/examples > small mistake, this is more proper url :) https://github.com/maciej-izak/PascalSmartPointers/tree/master/sources -- Best regards, Maciej Izak ___

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Maciej Izak
2018-04-23 13:26 GMT+02:00 LacaK : > If such feature will not be implemented, is there any other way how to > solve this problem (how to add functionalities to one class by adding more > units to final program)? > This can be easily solved by "default field" feature. The work is in progress (not

Re: [fpc-pascal] Read comments via fcl-passrc

2018-04-23 Thread Michael Van Canneyt
On Mon, 23 Apr 2018, Michael Fuchs wrote: Am 23.04.2018 um 12:43 schrieb Mattias Gaertner: I found TPasTreeContainer.NeedComments but it does nothing. Set that to true. Then create the parser. Ok, so I can not use the function ParseSource from unit PParser anymore and have to write my own

[fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread LacaK
Hi , I am sure that this was already discussed, but I can not find any conclusion. Is planned support for multiple class(objet, record) helpers in a way, that all class helpers can be used in parallel not only one? My use case is: In unit A I have declared base class. In unit B I have dec

Re: [fpc-pascal] Read comments via fcl-passrc

2018-04-23 Thread Michael Fuchs
Am 23.04.2018 um 12:43 schrieb Mattias Gaertner: >> I found TPasTreeContainer.NeedComments but it does nothing. > > Set that to true. Then create the parser. Ok, so I can not use the function ParseSource from unit PParser anymore and have to write my own one? > Read Parser.SavedComments on every

Re: [fpc-pascal] Read comments via fcl-passrc

2018-04-23 Thread Mattias Gaertner
On Mon, 23 Apr 2018 12:24:26 +0200 Michael Fuchs wrote: > Hi, > > while working with fcl-passrc I search for a possibility to get the > comments of a source file in the parsed tree. > > I found TPasTreeContainer.NeedComments but it does nothing. Set that to true. Then create the parser. Read P

[fpc-pascal] Read comments via fcl-passrc

2018-04-23 Thread Michael Fuchs
Hi, while working with fcl-passrc I search for a possibility to get the comments of a source file in the parsed tree. I found TPasTreeContainer.NeedComments but it does nothing. Am I missing something or is this not a feature of fcl-passrc? thanks Michael __