Details
-
Bug
-
Resolution: Fixed
-
P3
-
None
-
None
-
b82
-
generic
-
generic
-
Verified
Description
Andreas Rieber reported this:
------------------------
var guiPkgs = { JFrame: function() { print("created"); } };
with (guiPkgs) {
function main() {
var frame; // <---- this local variable causes scope to be not set properly
function createFrame() {
frame = new JFrame();
}
createFrame();
}
}
main();
>>
scriptpad.js:9 ReferenceError: "JFrame" is not defined
See alsoJDK-8006755
------------------------
var guiPkgs = { JFrame: function() { print("created"); } };
with (guiPkgs) {
function main() {
var frame; // <---- this local variable causes scope to be not set properly
function createFrame() {
frame = new JFrame();
}
createFrame();
}
}
main();
>>
scriptpad.js:9 ReferenceError: "JFrame" is not defined
See also