override - Error overloading procedure in Delphi -


for reason getting error '[dcc error] myfile.pas(52): e2137 method 'assign' not found in base class'. here snipit of assign procedures worked fine until added 1 more, last assign.

procedure assign(myclass: tmyclass); overload; override; procedure assign(myclass: thisservice.myclass); overload; override; procedure assign(myclass: thatservice.myclass); overload; override; procedure assign(myclass: txmlmyclass); overload; override; procedure assign(myclass: pbstruct1messages.tmyrecord); overload; override; procedure assign(myclass: pbstruct2messages.tmyrecord); overload; override; 

when use override, you're saying you're overriding virtual method same signature inherited parent class. if parent class doesn't have virtual method signature, compiler rightly complain can't find it.

check ancestor classes confirm method exists. if doesn't exist, don't mark 1 in descendant class override.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -