Revision: 4305 http://vexi.svn.sourceforge.net/vexi/?rev=4305&view=rev Author: mkpg2 Date: 2011-12-12 03:19:43 +0000 (Mon, 12 Dec 2011) Log Message: ----------- Fix. Was passing char not charCode into function.
Modified Paths: -------------- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/durationfield.t Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/durationfield.t =================================================================== --- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/durationfield.t 2011-12-12 01:05:02 UTC (rev 4304) +++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/durationfield.t 2011-12-12 03:19:43 UTC (rev 4305) @@ -82,7 +82,16 @@ } const isWhitespace = .util.abstractlexer..isWhitespace; - const isAlpha = .util.abstractlexer..isIdStart; + + const CA = "A".charCodeAt(0); + const CZ = "Z".charCodeAt(0); + const Ca = "a".charCodeAt(0); + const Cz = "z".charCodeAt(0); + const isAlpha = function(c){ + if(c==null) return false; + var code = c.charCodeAt(0); + return (code >= CA and CZ >= code) || (code >= Ca and Cz >= code); + }; const isDigit = .util.abstractlexer..isDigit; const lexer = new .util.abstractlexer(); const lexUnit = function(c){ @@ -101,7 +110,7 @@ } while( isWhitespace(c) ); // || c == '\u0020' || c == '\u0009' || c == '\u000C' || c == '\u000B' var code = c.charCodeAt(0); if (isDigit(code)) return lexer.lexNumber(c); - if (isAlpha(code)) return lexUnit(c); + if (isAlpha(c)) return lexUnit(c); return null; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn