瀏覽代碼

rtl: fixed SetMethodProp normal function

mattias 6 年之前
父節點
當前提交
07c76c5111
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      packages/rtl/typinfo.pas

+ 4 - 1
packages/rtl/typinfo.pas

@@ -1447,7 +1447,10 @@ begin
       end
     else if isString(TJSObject(Code)['fn']) then
       // named callback, different scope
-      cb:=createCallbackStr(Value.Data,string(TJSObject(Code)['fn']));
+      cb:=createCallbackStr(Value.Data,string(TJSObject(Code)['fn']))
+    else
+      // normal function
+      cb:=createCallbackPtr(Value.Data,Code);
     end
   else
     // not a valid value -> for compatibility set it anyway