Code: Select all
Type Display Extends Object
as Display Ptr ObjectType
Declare virtual sub redraw
End Type
Private sub Display.redraw
...
end sub
Type Container Extends Display
Declare sub redraw
end type
Private sub Container.redraw
...
end sub
Type Frame Extends Container
Declare sub redraw
end type
Private sub Frame.redraw
...
end sub
' main program
dim as display ptr P = New Frame
p->redraw
Since the object P that was created was a Frame, I expected that Frame.redraw would be executed.
According to FBdebugger Container.redraw was called instead
Why and what can I do to make the version of redraw executed to match the actual type created. I thought that was what the virtual routine definition of redraw would do.