[lazarus] CustomFormEditor : Problem #2 HELP!
Florian Klaempfl
Florian.Klaempfl at gmx.de
Mon Nov 20 12:53:03 EST 2000
At 18:53 20.11.2000, you wrote:
>Can someone pull the latest from CVS and tell me why my
>GetPropValue throws an error when compiling on line 244.
>
>
>I pass the procedure an untyped value
>Function GetPropValue(index : Intger; var Value) : Boolean;
>
>In the procedure I call
>
>if something then
>Value := GetEnumName(PropType,J) //returns a string
>else
>Value := J; //returns an integer
>
>which returns a string. This throws an error because it's expection type
>FORMAL????? I know there's something I have to do to get this to work
>with untyped parameters but I don't know it off hand.
You can't assign directly to a formal var parameter, use a move instead:
var
s : string;
...
temp:=GetEnumName(PropType,J);
move(temp,value,<length>);
More information about the Lazarus
mailing list