From df224ce490994024a73becdfdbdb10658dd956a9 Mon Sep 17 00:00:00 2001 From: Shallowmallow Date: Sun, 14 Apr 2024 17:20:33 +0200 Subject: [PATCH] Better error for "${ }" --- haxe/ui/macros/ComponentMacros.hx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/haxe/ui/macros/ComponentMacros.hx b/haxe/ui/macros/ComponentMacros.hx index fa5b7386a..1b3235caf 100644 --- a/haxe/ui/macros/ComponentMacros.hx +++ b/haxe/ui/macros/ComponentMacros.hx @@ -1150,6 +1150,8 @@ class ComponentMacros { if (StringTools.startsWith(bindingExpr, "${") && StringTools.endsWith(bindingExpr, "}")) { bindingExpr = bindingExpr.substring(2, bindingExpr.length - 1); + } else if (bindingExpr.indexOf("${") != -1) { + trace("ERROR: property value " + varProp +" contains \"${\" string, if you want to use code it must start with a \"${\" and end with with a \"}\""); } var expr = Context.parseInlineString(bindingExpr, Context.currentPos()); expr = ExprTools.map(expr, replaceInternalShortNames);