Browse Source

* Fix bug in event-based variables

git-svn-id: trunk@33986 -
michael 9 years ago
parent
commit
15c5ea3b9c
1 changed files with 5 additions and 0 deletions
  1. 5 0
      packages/fcl-base/src/fpexprpars.pp

+ 5 - 0
packages/fcl-base/src/fpexprpars.pp

@@ -2836,6 +2836,8 @@ end;
 
 Procedure TFPExprIdentifierNode.GetNodeValue(var Result : TFPExpressionResult);
 begin
+  if Identifier.EventBasedVariable then
+    Identifier.FetchValue;
   Result:=PResult^;
   Result.ResultType:=FResultType;
 end;
@@ -2861,7 +2863,9 @@ Var
 
 begin
   For I:=0 to Length(FArgumentParams)-1 do
+    begin
     FArgumentNodes[i].GetNodeValue(FArgumentParams[i]);
+    end;
 end;
 
 procedure TFPExprFunction.Check;
@@ -2942,6 +2946,7 @@ Procedure TFPFunctionCallBack.GetNodeValue(var Result : TFPExpressionResult);
 begin
   If Length(FArgumentParams)>0 then
     CalcParams;
+
   FCallBack(Result,FArgumentParams);
   Result.ResultType:=NodeType;
 end;