You could implement a SendMessage() method that all types have anyway and have the function call it.
Its not the same thing but can be used similiar:
Its not the same thing but can be used similiar:
Strict Type Ta Method SendMessage:Object( message:Object,sender:Object ) If String(message)="b" Print "the message is b" ElseIf String(message)="c" Print "the message is c" Else Print "unknown message" EndIf EndMethod End Type Local a:Ta = New Ta test(a,"b") test(a,"c") test(a,"x") Function test(z:Object,s:String) z.SendMessage(s,Null) Print "something" End Function