royale-compiler icon indicating copy to clipboard operation
royale-compiler copied to clipboard

Escaping Curly Braces for String literals in mxml

Open greg-dove opened this issue 5 years ago • 0 comments

Support escaping curly braces to allow curly braces in string literal assignments in mxml Flex permits the following: <s:Label text="\{entry\}" />

where 'entry' is a local [Bindable] property and the text will not create a binding, and will simply be interpreted as a string literal assigment.

Royale has a bug where the same code will create a binding, returning a string literal, something like the following:

function() { return "\\{entry\\"; },
  null,
  ["$ID27", "text"]

Aside from being unnecessary, that also results in the wrong content being displayed (because it retains the backslashes, and omits the second curly brace)

greg-dove avatar Jan 14 '20 20:01 greg-dove