Re: [fpc-pascal] class operator enumerator

2019-04-23 Thread Ben Grasset
Seems like it's mixed up in some way with the FPC-style enumerator operator, so the "class" version is recognized but not actually implemented currently or something. The normal way for classes/records/objects is to implement a GetEnumerator function, anyways. Here's an expanded-on version of

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

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

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 -

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

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

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

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] class operator enumerator

2019-04-23 Thread Ryan Joseph
Is "class operator enumerator” supposed to work or is this a bug that it compiles but doesn’t do anything? Seems like it should work. === {$mode objfpc} {$modeswitch advancedrecords} program test; type TArrayEnumerator = class public type TArrayValue =

Re: [fpc-pascal] Resolving math expression as input from user

2019-04-23 Thread Sven Barth via fpc-pascal
Am 23.04.2019 um 12:04 schrieb James Richters: I'm trying to figure out if there is some function available that would take a string as input and return a double value that is the complete evaluation of the string? So when asked for a numeric input, the user could just put in a number like

[fpc-pascal] Resolving math expression as input from user

2019-04-23 Thread James Richters
I'm trying to figure out if there is some function available that would take a string as input and return a double value that is the complete evaluation of the string? So when asked for a numeric input, the user could just put in a number like 6.28 but also put in a formula like SQRT(2) or