Skip to content

Commit 74a42f4

Browse files
committed
// BH 7/2/2018 10:00:49 PM fix logic for FileReader for Chrome
// BH 7/2/2018 12:50:55 PM Character.prototype.objectValue() and Character.prototype.intValue(), for enhanced FOR in transpiler
1 parent d5b8801 commit 74a42f4

4 files changed

Lines changed: 14 additions & 12 deletions

File tree

101 Bytes
Binary file not shown.

sources/net.sf.j2s.java.core/srcjs/js/j2sApplet.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// j2sCore.js (based on JmolCore.js
22

3+
// BH 7/2/2018 10:00:49 PM fix logic for FileReader for Chrome
34
// BH 7/1/2018 7:25:25 AM fixes drag-drop for first call in Firefox/win
45
// BH 6/29/2018 9:48:13 AM fixes key info for mouse move
56
// BH 6/27/2018 12:45:44 PM adds DND for frames
@@ -895,11 +896,11 @@ J2S._getDefaultLanguage = function(isAll) { return (isAll ? J2S.featureDetection
895896
+'<button id="ID_cancel">cancel</button>'
896897
+'</div>'
897898
+'<div>').replace(/ID/g, id);
898-
var parent = (!parentDiv || parentDiv == "body" ? parentDiv
899+
var parent = (!parentDiv | parentDiv == "body" ? "body"
899900
: typeof parentDiv == "string" ? "#" + parentDiv
900901
: parentDiv);
901902
if (parent == "body") {
902-
J2S.$after(body, div);
903+
J2S.$after(document.body, div);
903904
} else {
904905
J2S.$append(parent, div);
905906
}

sources/net.sf.j2s.java.core/srcjs/js/j2sClazz.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77

88
// Google closure compiler cannot handle Clazz.new or Clazz.super
99

10-
// BH 7/2/2018 12:50:55 PM Character.objectValue(), for enhanced FOR in transpiler
10+
// BH 7/2/2018 12:50:55 PM Character.prototype.objectValue() and Character.prototype.intValue(), for enhanced FOR in transpiler
1111
// BH 6/29/2018 10:13:51 AM array.equals$O, fixes array.clone
1212
// BH 6/28/2018 7:34:58 AM fix for array.clone not copying array in the case of objects
1313
// BH 6/27/2018 3:11:50 PM fix for class String not indicating its name
1414
// BH 6/25/2018 3:06:30 PM adds String.concat$S
1515
// BH 6/25/2018 12:10:25 PM Character.toTitleCase, isTitleCase as ...UpperCase
1616
// BH 6/25/2018 10:23:24 AM really fixing new int[] {'a'} using .$c() see Test_Byte.java
17-
// BH 6/21/2018 1:08:58 PM missing mysterious Integer.objectValue()
17+
// BH 6/21/2018 1:08:58 PM missing mysterious Integer.prototype.objectValue()
1818
// BH 6/20/2018 6:00:23 AM missing printStackTrace(PrintStream)
1919
// BH 6/19/2018 8:49:57 AM fix for checkDeclared
2020
// BH 5/19/2018 8:22:25 PM fix for new int[] {'a'}
@@ -4122,8 +4122,8 @@ Short.prototype.objectValue =
41224122
Long.prototype.objectValue =
41234123
Float.prototype.objectValue =
41244124
Double.prototype.objectValue = function() {return this.valueOf()};
4125-
Character.prototype.objectValue = function() { return this.value }
4126-
4125+
Character.prototype.objectValue = function() { return this.value };
4126+
Character.prototype.intValue = function() { return this.value.codePointAt(0) };
41274127

41284128

41294129
// TODO: Only asking for problems declaring Date. This is not necessary

sources/net.sf.j2s.java.core/srcjs/swingjs2.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10654,6 +10654,7 @@ return jQuery;
1065410654
})(jQuery,document,"click mousemove mouseup touchmove touchend", "outjsmol");
1065510655
// j2sCore.js (based on JmolCore.js
1065610656

10657+
// BH 7/2/2018 10:00:49 PM fix logic for FileReader for Chrome
1065710658
// BH 7/1/2018 7:25:25 AM fixes drag-drop for first call in Firefox/win
1065810659
// BH 6/29/2018 9:48:13 AM fixes key info for mouse move
1065910660
// BH 6/27/2018 12:45:44 PM adds DND for frames
@@ -11549,11 +11550,11 @@ J2S._getDefaultLanguage = function(isAll) { return (isAll ? J2S.featureDetection
1154911550
+'<button id="ID_cancel">cancel</button>'
1155011551
+'</div>'
1155111552
+'<div>').replace(/ID/g, id);
11552-
var parent = (!parentDiv || parentDiv == "body" ? parentDiv
11553+
var parent = (!parentDiv | parentDiv == "body" ? "body"
1155311554
: typeof parentDiv == "string" ? "#" + parentDiv
1155411555
: parentDiv);
1155511556
if (parent == "body") {
11556-
J2S.$after(body, div);
11557+
J2S.$after(document.body, div);
1155711558
} else {
1155811559
J2S.$append(parent, div);
1155911560
}
@@ -13091,14 +13092,14 @@ J2S._getResourcePath = function(path, isJavaPath) {
1309113092

1309213093
// Google closure compiler cannot handle Clazz.new or Clazz.super
1309313094

13094-
// BH 7/2/2018 12:50:55 PM Character.objectValue(), for enhanced FOR in transpiler
13095+
// BH 7/2/2018 12:50:55 PM Character.prototype.objectValue() and Character.prototype.intValue(), for enhanced FOR in transpiler
1309513096
// BH 6/29/2018 10:13:51 AM array.equals$O, fixes array.clone
1309613097
// BH 6/28/2018 7:34:58 AM fix for array.clone not copying array in the case of objects
1309713098
// BH 6/27/2018 3:11:50 PM fix for class String not indicating its name
1309813099
// BH 6/25/2018 3:06:30 PM adds String.concat$S
1309913100
// BH 6/25/2018 12:10:25 PM Character.toTitleCase, isTitleCase as ...UpperCase
1310013101
// BH 6/25/2018 10:23:24 AM really fixing new int[] {'a'} using .$c() see Test_Byte.java
13101-
// BH 6/21/2018 1:08:58 PM missing mysterious Integer.objectValue()
13102+
// BH 6/21/2018 1:08:58 PM missing mysterious Integer.prototype.objectValue()
1310213103
// BH 6/20/2018 6:00:23 AM missing printStackTrace(PrintStream)
1310313104
// BH 6/19/2018 8:49:57 AM fix for checkDeclared
1310413105
// BH 5/19/2018 8:22:25 PM fix for new int[] {'a'}
@@ -17206,8 +17207,8 @@ Short.prototype.objectValue =
1720617207
Long.prototype.objectValue =
1720717208
Float.prototype.objectValue =
1720817209
Double.prototype.objectValue = function() {return this.valueOf()};
17209-
Character.prototype.objectValue = function() { return this.value }
17210-
17210+
Character.prototype.objectValue = function() { return this.value };
17211+
Character.prototype.intValue = function() { return this.value.codePointAt(0) };
1721117212

1721217213

1721317214
// TODO: Only asking for problems declaring Date. This is not necessary

0 commit comments

Comments
 (0)