IgniteEngine-iOS icon indicating copy to clipboard operation
IgniteEngine-iOS copied to clipboard

Support for executing eval utilities on strings

Open brandonscript opened this issue 10 years ago • 2 comments

Currently you can only execute a variable utility on a variable, which requires setting a variable first.

Should be able to support utils directly on strings, like:

"text": "[[aControl.dollarValue+' .00':currency(USD)]]",
"text": "[['some text here':capitalize]]"

Open to suggestions on implementation, but it shouldn't be too difficult to split by + and evaluate anything not separated by quotes as a string.

brandonscript avatar Mar 10 '15 20:03 brandonscript

Implemented in https://github.com/ApigeeDelta/ignite-iOS-engine/commit/1bd4b42edee964833896c40be67dc25a8e7644ab

jeremyanticouni avatar May 01 '15 21:05 jeremyanticouni

Still TODO:

  • Support multiple strings mixed with variables inside the declaration [[$row.dollarValue+' .00':currency(USD)]]
  • Means of escaping single quotes to support things like [['I like ice cream! Don't you?':utility]]

Single string method is now documented ([['I like ice cream!':utility]]).

brandonscript avatar May 06 '15 19:05 brandonscript