Re: [fpc-pascal] Record helper properties

2019-04-24 Thread Mattias Gaertner via fpc-pascal
On Wed, 24 Apr 2019 17:16:05 +0200 Sven Barth via fpc-pascal wrote: > Am 24.04.2019 um 15:28 schrieb Ryan Joseph: > > > >> On Apr 24, 2019, at 2:27 AM, Michael Van Canneyt > >> wrote: > >> > >> I would think this should be allowed, yes. I see no reason to > >> disallow it. > > Agreed but Sve

Re: [fpc-pascal] Record helper properties

2019-04-24 Thread Sven Barth via fpc-pascal
Am 24.04.2019 um 15:28 schrieb Ryan Joseph: On Apr 24, 2019, at 2:27 AM, Michael Van Canneyt wrote: I would think this should be allowed, yes. I see no reason to disallow it. Agreed but Sven says something about published fields though. The property just acts as simple alias so I don’t unde

Re: [fpc-pascal] Record helper properties

2019-04-24 Thread Ryan Joseph
> On Apr 24, 2019, at 2:27 AM, Michael Van Canneyt > wrote: > > I would think this should be allowed, yes. I see no reason to disallow it. Agreed but Sven says something about published fields though. The property just acts as simple alias so I don’t understand what the problem could be eith

Re: [fpc-pascal] Record helper properties

2019-04-23 Thread Michael Van Canneyt
On Tue, 23 Apr 2019, Ryan Joseph wrote: On Apr 23, 2019, at 5:32 PM, Michael Van Canneyt wrote: That should be obvious: Because a helper can only add methods to a type, not additional storage space (memory). The basic type determines the memory layout of the data. A helper cannot change

Re: [fpc-pascal] Record helper properties

2019-04-23 Thread Tomas Hajny
On 2019-04-24 02:36, Ryan Joseph wrote: On Apr 23, 2019, at 8:28 PM, Alexander Grotewohl wrote: http://wiki.freepascal.org/Helper_types under the checklistbox extender example. I'd guess it's looking for THelper.GetX and THelper.SetX in your and not finding them Oh now I get it. Is thi

Re: [fpc-pascal] Record helper properties

2019-04-23 Thread Ryan Joseph
> On Apr 23, 2019, at 8:28 PM, Alexander Grotewohl wrote: > > http://wiki.freepascal.org/Helper_types > > under the checklistbox extender example. > > I'd guess it's looking for THelper.GetX and THelper.SetX in your and not > finding them > Oh now I get it. Is this what I should be doing?

Re: [fpc-pascal] Record helper properties

2019-04-23 Thread Alexander Grotewohl
http://wiki.freepascal.org/Helper_typesunder the checklistbox extender example.I'd guess it's looking for THelper.GetX and THelper.SetX in your  and not finding them--Alexander Grotewohlhttp://dcclost.com___ fpc-pascal maillist - fpc-pascal@lists.freepa

Re: [fpc-pascal] Record helper properties

2019-04-23 Thread Ryan Joseph
> On Apr 23, 2019, at 6:25 PM, Sven Barth via fpc-pascal > wrote: > > A helper can not access its extended type in its interface, only in its > implementation (and yes, this gets important if published properties are > involved, which a helper may declare as well). > Use a getter as a workar

Re: [fpc-pascal] Record helper properties

2019-04-23 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Di., 23. Apr. 2019, 21:54: > So I remember now that any fields are not allowed in helpers. Can anyone > explain why this must be the case or if it could be fixed? > A helper can not access its extended type in its interface, only in its implementation (and yes, this gets i

Re: [fpc-pascal] Record helper properties

2019-04-23 Thread Ryan Joseph
> On Apr 23, 2019, at 5:32 PM, Michael Van Canneyt > wrote: > > That should be obvious: > > Because a helper can only add methods to a type, not additional storage > space (memory). The basic type determines the memory layout of the data. A > helper cannot change that. > > Michael. I mean

Re: [fpc-pascal] Record helper properties

2019-04-23 Thread Michael Van Canneyt
On Tue, 23 Apr 2019, Ryan Joseph wrote: So I remember now that any fields are not allowed in helpers. Can anyone explain why this must be the case or if it could be fixed? That should be obvious: Because a helper can only add methods to a type, not additional storage space (memory). The ba

Re: [fpc-pascal] Record helper properties

2019-04-23 Thread Ryan Joseph
So I remember now that any fields are not allowed in helpers. Can anyone explain why this must be the case or if it could be fixed? > On Apr 20, 2019, at 11:24 AM, Ryan Joseph wrote: > > I feel like I may have asked this before but I can’t find anything on Google. > Why doesn’t this work? > >

[fpc-pascal] Record helper properties

2019-04-20 Thread Ryan Joseph
I feel like I may have asked this before but I can’t find anything on Google. Why doesn’t this work? program test; type TRec = record x: integer; end; type THelper = record helper for TRec property F: integer read x; // <<<—— ERROR: Unknow