[fpc-pascal] Type-casting a class variable

Adriaan van Os adriaan at adriaan.biz
Thu May 2 08:32:16 CEST 2024


Martin Frb via fpc-pascal wrote:

> Silly question, but did you assign the value to the variable?
> 
> myClass := TWindow;

That's what I did.

> TWindow(myClass).CreateNewWindow;

And this is what crashes. I can report this, if the type-cast is supposed to work.

Regards,

Adriaan van Os



More information about the fpc-pascal mailing list