Martin Frb via fpc-pascal wrote:

My example (2nd part of it) was actually wrong.

It was mentioned before

On 01/05/2024 19:43, Jean SUZINEAU via fpc-pascal wrote:
I didn't tested but I imagine it could be done with something like this ?

type
       TWindow_Class= class of TWindow;
begin
          ...
          (myClass as TWindow_Class).CreateNewWindow( ....);

It must be cast to another "class of"

When I do that, the compiler emits

        Class or COM interface type expected, but got "TClass"

I am using

        {$mode macpas}
        {$modeswitch class}
        {$interfaces corba}

Regards,

Adriaan van Os
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to