From 07c76c51115bc593af13efd908528a4d7cd38c74 Mon Sep 17 00:00:00 2001 From: mattias Date: Tue, 22 Oct 2019 11:39:31 +0000 Subject: [PATCH] rtl: fixed SetMethodProp normal function --- packages/rtl/typinfo.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/rtl/typinfo.pas b/packages/rtl/typinfo.pas index 0b99420..e9150a5 100644 --- a/packages/rtl/typinfo.pas +++ b/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