[Lazarus] Procedural variables as methods

Timothy Groves the.tail.kinker at gmail.com
Sun Jul 28 23:25:25 CEST 2013

OK, so I solved the problem of assigning a function to a procedural 
variable (the problem was that I was stupid).  But now I can't call it.  
When I attempt to do so, it gives me:

ghistory.pas(260,19) Error: Incompatible types: got 
"tLanguage.<procedure variable type of function:AnsiString;Register>" 
expected "AnsiString"

Is there something I have to add to the call to make it work?  Some code 

(in tLanguage method)
       MaleName := @SaxonMale;
       FemaleName := @SaxonFemale;
       ClanName := @SaxonFamily;
       PlaceName := @SaxonPlace;

(in main code)
         Language := tLanguage.Create;
         a := Language.ClanName;

More information about the Lazarus mailing list