Closed timothykang closed 10 years ago
Brackets and braces are valid keydowns: (jcsdl.gui.logic.js, line 932)
$input.keydown(function(ev) { var k = ev.which, s = ev.shiftKey; if ( ... // allow open bracket || k == 219 ... // allow close bracket || k == 221 ... ) { return; } else { // disallow anything else ev.preventDefault(); }
...but not valid tokens: (jcsdl.gui.logic.js, line 520):
tokensMap : { '(' : 'bracketOpen', ')' : 'bracketClose', '&' : 'operatorAnd', '|' : 'operatorOr', '!' : 'operatorNot', 'filter' : 'filter' }, ... if (this.tokensMap[t] === undefined) { throw 'Invalid character "' + token + '" in the logic!'; }
Looks like brackets and braces need to either be removed from the list of valid keydowns, or added to tokensMap.
tokensMap
Good spot ;) Fixed.
Brackets and braces are valid keydowns: (jcsdl.gui.logic.js, line 932)
...but not valid tokens: (jcsdl.gui.logic.js, line 520):
Looks like brackets and braces need to either be removed from the list of valid keydowns, or added to
tokensMap
.