change object class
    Vitaliy Fadeev 
    vital.fadeev at gmail.com
       
    Sat Sep 23 03:11:57 UTC 2023
    
    
  
On Friday, 22 September 2023 at 19:50:17 UTC, Christian Köstlin 
wrote:
> another option could be to model your own VTable in a struct 
> like this:
> https://run.dlang.io/is/3LTjP5
>
> Kind regards,
> Christian
Thank, Christian !
True nice tasty solution with ```VTable```!
And further... the project is growing.
```
void Draw()
{
   DrawBG();
   DrawFG();
}
```
And we want use ```DrawBG()``` code  from ```initial``` in other 
states, like ```Selected```.
How to use some functions from ```initial``` via ```VTable``` ?
I see solution in ```classes``` and methods with ```override``` 
keyword.
```VTable``` does the same thing as ```__vptr``` ?
    
    
More information about the Digitalmars-d-learn
mailing list