From 924684d4a4eae46f9ff274af2e7ba96c476a973e Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Tue, 23 Jul 2024 16:27:23 +0300 Subject: [PATCH] Adding support for ClassSymbolNative.native_object_getter for @bhl_custom_rw --- tpl/bhl_bind_macro.twig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tpl/bhl_bind_macro.twig b/tpl/bhl_bind_macro.twig index 4b1eb4d..2e8e392 100644 --- a/tpl/bhl_bind_macro.twig +++ b/tpl/bhl_bind_macro.twig @@ -638,6 +638,13 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack {% endif ~%} #if !BHL_FRONT , native_type: typeof({{token_or(o, 'bhl_native_class', o.name)}}) + {% if has_token(o, 'bhl_custom_rw') %} + , native_object_getter: (v) => { + var tmp = new {{token_or(o, 'bhl_native_class', o.name)}}(); + v.Decode(ref tmp); + return tmp; + } + {% endif %} #endif ); {{scope}}.{{o.name|ns_prefix}}Define(cl);