From 762eb07dd4b95a555d0abf4933d042e5980fd426 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 7 Jun 2016 23:01:23 +0100 Subject: [PATCH] Add support for array-syntax in typedInput msg properties --- editor/js/ui/typedInput.js | 75 +++++++++++++++- red/runtime/util.js | 160 +++++++++++++++++++++++++++++----- test/red/runtime/util_spec.js | 103 +++++++++++++++++++++- 3 files changed, 310 insertions(+), 28 deletions(-) diff --git a/editor/js/ui/typedInput.js b/editor/js/ui/typedInput.js index a02a39998..758bb51c8 100644 --- a/editor/js/ui/typedInput.js +++ b/editor/js/ui/typedInput.js @@ -14,10 +14,79 @@ * limitations under the License. **/ (function($) { + function validateExpression(str) { + var length = str.length; + var start = 0; + var inString = false; + var inBox = false; + var quoteChar; + var v; + for (var i=0;i