Re: JSAdapter problem

2013-05-28 Thread Jim Laskey (Oracle)
We are working up a Rhino to Nashorn migration document. It will be another month or so before it's ready for public consumption. Cheers, -- Jim On 2013-05-28, at 11:49 AM, Andreas Rieber wrote: > Hi Sundar, > > is it worth adding a compatibility or migration section to > nashorn/docs/Jav

Re: JSAdapter problem

2013-05-28 Thread Andreas Rieber
Hi Sundar, is it worth adding a compatibility or migration section to nashorn/docs/JavaScriptingProgrammersGuide.html? With the Rhino JSAdapter the __get__ method could return a function and there was no such __call__ method. regards Andreas On 28.05.13 14:06, A. Sundararajan wrote: Hi And

Re: JSAdapter problem

2013-05-28 Thread A. Sundararajan
Hi Andreas, JSAdapter in nashorn introduces __call__ method. This is called when a "method" is called on an object. obj.x(); // --> calls __call__ method obj.x // --> calls __get__ method Thanks -Sundar On Monday 27 May 2013 03:36 PM, Andreas Rieber wrote: Hi, i just try to get the jconsol

JSAdapter problem

2013-05-27 Thread Andreas Rieber
Hi, i just try to get the jconsole-plugin working and found the following issue with JSAdapter: var obj = new JSAdapter() { __get__: function (name) { return function() { print(name); }; } }; var func = obj.x; func(); obj.x(); Expected output should be x x