scriptpad testing
Andreas Rieber
rieberandreas at gmail.com
Thu Jan 24 05:33:01 PST 2013
Hi Sundar,
i found that fix and retested. One line more and same problem (the 'var
frame' outside the createFrame() function).
>>
var guiPkgs = { JFrame: function() { print("created"); } };
with (guiPkgs) {
function main() {
var frame;
function createFrame() {
frame = new JFrame();
}
createFrame();
}
}
main();
>>
scriptpad.js:9 ReferenceError: "JFrame" is not defined
- Andreas
On 24.01.13 13:47, A. Sundararajan wrote:
> Hi Andreas
>
> Fixed that function-inside-with-statement issue.(
> http://hg.openjdk.java.net/nashorn/jdk8/nashorn/rev/3f528769aee1 )
>
> I reproduced the ClassCastException you mentioned. I'll file a bug
> after collecting bit more info. FYI.
>
> Thanks
> -Sundar
>
>
> On Wednesday 23 January 2013 07:35 PM, Andreas Rieber wrote:
>> Hi Sundar,
>>
>> find attached the tgz. You can run it direct with jjs or better with
>> jrunscript for the JavaImporter. The exception happens when you
>> select samples from the menu. First two entries work, but from 3rd
>> you get the exception.
>>
>> - Andreas
>>
>> On 23.01.13 14:53, A. Sundararajan wrote:
>>> HI Andreas,
>>>
>>> Sounds good. Please send zip/tar of your modified app
>>>
>>> -Sundar
>>>
>>> On Wednesday 23 January 2013 07:21 PM, Andreas Rieber wrote:
>>>> Hi Sundar,
>>>>
>>>> it is awt event which ends in a classcastexception. Let me try to
>>>> build a smaller sample, or should i send you the scriptpad i have
>>>> so you can try?
>>>>
>>>> Exception in thread "AWT-EventQueue-0"
>>>> java.lang.ClassCastException: Cannot cast
>>>> java.awt.event.ActionEvent to [Ljava.lang.Object;
>>>> at
>>>> sun.invoke.util.ValueConversions.newClassCastException(ValueConversions.java:461)
>>>> at
>>>> sun.invoke.util.ValueConversions.castReference(ValueConversions.java:456)
>>>> at
>>>> jdk.nashorn.internal.javaadapters.java.awt.event.ActionListener.actionPerformed(Unknown
>>>> Source)
>>>> at
>>>> javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
>>>>
>>>> at
>>>> javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
>>>>
>>>> - Andreas
>>>>
>>>> On 23.01.13 14:36, A. Sundararajan wrote:
>>>>> Hi Andreas,
>>>>>
>>>>> No, I've not fixed anything w.r.t "with" statement. You mentioned
>>>>> you had faced complex issues with JSR223 -- I did some fixes in
>>>>> nashorn's JSR223 engine implementation.
>>>>>
>>>>> For the 'with' issue, Jim has filed a bug
>>>>>
>>>>> thanks
>>>>> -Sundar
>>>>>
>>>>> On Wednesday 23 January 2013 07:03 PM, Andreas Rieber wrote:
>>>>>> Hi Sundar,
>>>>>>
>>>>>> i have your last changes, did another update and fresh build 1
>>>>>> minute ago:
>>>>>>
>>>>>> sh bin/jjs scriptpad.js
>>>>>> scriptpad.js:7 ReferenceError: "JFrame" is not defined
>>>>>>
>>>>>> where the scriptpad.js is:
>>>>>>
>>>>>> var guiPkgs = { JFrame: function() { print("created"); } };
>>>>>>
>>>>>> with (guiPkgs) {
>>>>>> function main() {
>>>>>> function createFrame() {
>>>>>> var frame = new JFrame();
>>>>>> }
>>>>>>
>>>>>> createFrame();
>>>>>> }
>>>>>> }
>>>>>>
>>>>>> main();
>>>>>>
>>>>>>
>>>>>> - Andreas
More information about the nashorn-dev
mailing list