Op 2-5-2024 om 08:32 schreef Adriaan van Os via fpc-pascal:
TWindow(myClass).CreateNewWindow;
And this is what crashes. I can report this, if the type-cast is
supposed to work.
Known gotcha. Is and as are no good for method variables, use:
if myclass.inheritsfrom(twindow) then
twindow(myclass).createnewwindow
else
raise exception.create('something''s rotten in the state of ...');
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal