<div dir="ltr">Use TProcedure as type of the properties.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/7/27 Timothy Groves <span dir="ltr"><<a href="mailto:the.tail.kinker@gmail.com" target="_blank">the.tail.kinker@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Okay, I've spent an hour googling this one, and got no information that helps.  I want to declare four methods as being procedural variables, so that I can set them and call them.  Code follows. When I try to compile this, I get:<br>

<br>
glanguage.pas(37,20) Error: Incompatible types: got "<address of function:AnsiString;Register>" expected "tLanguage.<procedure variable type of procedure;Register>".<br>
<br>
What am I doing wrong?<br>
<br>
<br>
<br>
unit glanguage;<br>
<br>
{$mode objfpc}{$H+}<br>
<br>
interface<br>
<br>
uses<br>
  Classes, SysUtils;<br>
<br>
type<br>
  tLanguage = class (tObject)<br>
    private<br>
      t_ClanNames : array of string;<br>
      t_language : integer;<br>
      procedure SetLanguage (a : integer);<br>
    public<br>
      FirstName : procedure;<br>
      LastName : procedure;<br>
      ClanName : procedure;<br>
            PlaceName : procedure;<br>
      property Language : integer read t_language write SetLanguage;<br>
  end;<br>
<br>
implementation<br>
<br>
uses<br>
  wrdsaxon;<br>
<br>
const<br>
  LG_NONE = 0;<br>
    LG_SAXON = 1;<br>
<br>
procedure tLanguage.SetLanguage (a : integer);<br>
begin<br>
  case a of<br>
        LG_SAXON : begin<br>
      FirstName := @SaxonMale;<br>
      LastName := @SaxonFemale;<br>
      ClanName := @SaxonFamily;<br>
      PlaceName := @SaxonPlace;<br>
      end;<br>
  end;<br>
end;<br>
<br>
end.<br>
<br>
<br>
--<br>
______________________________<u></u>_________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org" target="_blank">Lazarus@lists.lazarus.<u></u>freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.<u></u>freepascal.org/mailman/<u></u>listinfo/lazarus</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><i>Timeo hominem unius libri</i><br><br>[]s<br>Guionardo Furlan<br><a href="http://www.guionardofurlan.com.br" target="_blank">http://www.guionardofurlan.com.br</a></div>

</div>