Hybrid View
-
15 Dec 2010 9:02 PM #1
Is it JS Builder bug or is coding bug?
Is it JS Builder bug or is coding bug?
Hi,dear JS Builder boss and all
my javascript code file has this part :
"content: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\
<html xmlns="http://www.w3.org/1999/xhtml">\
<head>\
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\
{style}\
{script}\
</head>\
<body>\
{mailContent}\
{mailAttachment}\
</body>\
</html>',
"
when i run JS Builder build this file that it's failure and throw error.
the error message is:
'Error: JSMIN unterminated string literal: 10 ...
as JSBuild.JSMin.action(Int32 d)
as JSBuild.JSMin.jsmin()
... etc...
'
but is build OK after i delete "\" and \n
the same problem is your google code as:
http://code.google.com/p/js-builder/issues/detail?id=30
http://code.google.com/p/js-builder/issues/detail?id=31
I do not know if the issue is resolved
we do not need to backslash wrap?
-
7 Feb 2011 9:38 AM #2
I might add a filter for that to the JSBuilder2 line ive added contribs to.
-
7 Feb 2011 11:27 AM #3
It looks like for my build of JSBuilder2, this works fine.
My exact test phrase was:
Code:var bob = 'dkjfkfjkdf dfjdkf" " dfkj \ kdjfkd "" "fj k dfklsdjkldsfj dskl dsdsf \ dskfjkjdkdsfjkfdslfjsfjjfkdsljfsdklfj';
-
7 Feb 2011 12:05 PM #4
I just tried your string. Its not the line wrap thats causing it to blow, at least in the version i have. And its for sure not the tool JSBuilder itself.
Ext.lib.Dom.getRegion = function(el) {
var bob = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> {style}{script}</head><body>{mailContent}{mailAttachment}</body></html>';
return Ext.lib.Region.getRegion(el);
};
You can try that in JSLint and it passes. Try it with the paser for the compressor and it blows. I'm on crack or its jsut nto parsing it correctly and blowing. Some kind of escape or sequence i dot kno0w about?
-
7 Feb 2011 12:08 PM #5
[java] Exception in thread "main" java.lang.NullPointerException
[java] at org.mozilla.javascript.Parser.addError(Parser.java:141)
[java] at org.mozilla.javascript.TokenStream.getToken(TokenStream.java:518)
-
13 Feb 2011 11:25 PM #6
Thanks for your help
Thanks for your help
JS builder version 1.1.2 is used by me, it's not JSbuilder2,very pleased know new version that is ok by your help,Really, very grateful again, you are a very nice person
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
[2.0b1][CLOSED] (Bug? Not a bug?) getLeft/setLeft, etc - API oddity
By tjcrowder in forum Ext 2.x: BugsReplies: 12Last Post: 22 Mar 2008, 8:22 AM -
[2.0b1][CLOSED][was not a bug] Firefox FormPanel colapse and scroll bug
By davood_firoozian in forum Ext 2.x: BugsReplies: 2Last Post: 1 Nov 2007, 9:39 PM -
[1.1RC1] JsonStore's proxy config - doc bug or source bug?
By mystix in forum Ext 1.x: BugsReplies: 2Last Post: 19 Aug 2007, 11:27 AM -
Traced: bug in core Ext.Elements getAlignToXY, another bug remains
By Zuni in forum Ext 1.x: BugsReplies: 7Last Post: 31 May 2007, 10:50 AM -
Ext Dependency Builder - Example Bug
By humpdi in forum Ext 1.x: BugsReplies: 2Last Post: 22 May 2007, 5:17 PM


Reply With Quote