Note this code entered on a tablet from memory, not copied and pasted..so treat as notional.
So in one unit - say base - I declare -
Class a_base_object = class(TObject)
Protected
rt_App_Message
is_Message : String ;
End ,
Function uf_App_Message (art_Message : rt_App_Message ) : Integer ; Virtual; Abstract ;
End ;
In another unit ...
Uses base, child
Class Fred = (n_base_Object)
Type
uf_App_Message( art_Message : rt_App_Message) : Integer ; Override ;
End ;
Function Fred.uf_App_Message(art_Message : rt_App_Message) : Integer ;
Begin
//Whatever
End ;
Function test() : Integer ;
Var
ln_Tom : Tom ;
Begin
ln_Tom := Tom.Create(nil) ;
ln_Tom.in_Parent := Self ;
End ;
In another unit - say child
Uses base,
Class Tom = (n_base_object)
Protected
in_Parent : n_base_Object ;
End ;
Function test () : Integer ;
lrt_Message : rt_App_Message
Begin
ln_Parent.uf_App_message(lrt_App_Message) ; {<<<<<<< Compile Error Identifier idents no member 'uf_app_message'}
End ;
All I am trying to do is add uf_app_message to Tobject - works like I am doing in other languages! Tried using Helpers- got the same error message, And the less said about Dispatch methods the better - I can not find a single clear example - and yes, I read the example in the doco and I found it as clear as mud.
As always appreciate the help..