Re: [fpc-pascal] Variants with classes and records

2022-10-05 Thread Sven Barth via fpc-pascal
Am 05.10.2022 um 14:16 schrieb Hairy Pixels via fpc-pascal: Is it possible to assign a class to a variant? I tried and get a crash. If not, why not? It’s just a pointer so I would expect it to work. There is no field that would hold a class reference and no type value that would differentiate

Re: [fpc-pascal] CodeTools complete code

2022-10-05 Thread Hairy Pixels via fpc-pascal
> On Oct 5, 2022, at 7:19 PM, Bart via fpc-pascal > wrote: > > Ok, that makes me kinf of curious wether you and I mean the same when > we refer to CodeTools. > I mean the part of the Lazarus IDE that does code completion etc. > Since you don;t use Lazarus, you must mean something else? I have

Re: [fpc-pascal] CodeTools complete code

2022-10-05 Thread Bart via fpc-pascal
On Wed, Oct 5, 2022 at 2:17 PM Hairy Pixels via fpc-pascal wrote: > > CodeTools is part of Lazarus. ... > > Ok thanks. I’m not a Lazarus user so I don’t really follow those forums. > Ok, that makes me kinf of curious wether you and I mean the same when we refer to CodeTools. I mean the part of th

Re: [fpc-pascal] CodeTools complete code

2022-10-05 Thread Hairy Pixels via fpc-pascal
> On Oct 5, 2022, at 4:23 PM, Bart via fpc-pascal > wrote: > > On Wed, Oct 5, 2022 at 8:33 AM Hairy Pixels via fpc-pascal > wrote: > >> Does CodeTools not understand generic class function calls? Here is the >> class in question: > > CodeTools is part of Lazarus. > So, better ask on the La

[fpc-pascal] Variants with classes and records

2022-10-05 Thread Hairy Pixels via fpc-pascal
Is it possible to assign a class to a variant? I tried and get a crash. If not, why not? It’s just a pointer so I would expect it to work. I also see a “varRecord” constant (in varianth.inc) which suggests you could assign a record to a variant but I get an error trying to do this, and honestly

Re: [fpc-pascal] CodeTools complete code

2022-10-05 Thread Bart via fpc-pascal
On Wed, Oct 5, 2022 at 8:33 AM Hairy Pixels via fpc-pascal wrote: > Does CodeTools not understand generic class function calls? Here is the class > in question: CodeTools is part of Lazarus. So, better ask on the Lazarus ML. (And yes, CodeTools has problems with generics.) -- Bart __