Norris Boyd wrote:
> On Jun 9, 10:03 am, Norris Boyd <[EMAIL PROTECTED]> wrote:
>> On Jun 8, 12:06 pm, Frank <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>>> Hi group,
>>> I'm simply trying to do get the subject's matter running ... and fail. I
>>> googled 2 pieces for this and both don't work.
>>> Using this:
>>> var tableModel = new AbstractTableModel() {
>>>      getRowCount: function() { return 2; },
>>>      getColumnCount: function() { return 2; },
>>>      getValueAt: function(row, column) {
>>>          return "ABC";
>>>      }};
>>> var jTable = new JTable(tableModel);
>>> results in this:
>>> Exception in thread "main" java.lang.AbstractMethodError:
>>> adapter1.getColumnCount()I
>>>          at javax.swing.JTable.createDefaultColumnsFromModel(Unknown Source)
>>>          at javax.swing.JTable.tableChanged(Unknown Source)
>>>          at javax.swing.JTable.setModel(Unknown Source)
>>>          at javax.swing.JTable.<init>(Unknown Source)
>>>          at javax.swing.JTable.<init>(Unknown Source)
>>>          at
>>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>>          at
>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
>>>          at
>>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
>>>          at java.lang.reflect.Constructor.newInstance(Unknown Source)
>>>          at org.mozilla.javascript.MemberBox.newInstance(MemberBox.java:184)
>>>          at
>>> org.mozilla.javascript.NativeJavaClass.constructSpecific(NativeJavaClass.java:274)
>>>          at
>>> org.mozilla.javascript.NativeJavaClass.construct(NativeJavaClass.java:193)
>>>          at
>>> org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3380)
>>>          at
>>> ...
>>> Same error also for:
>>> var tableModel = new JavaAdapter(AbstractTableModel, {
>>>      getRowCount: function() { return 2; },
>>>      getColumnCount: function() { return 2; },
>>>      getValueAt: function(row, column) {
>>>          return "ABC";
>>>      }});
>>> var jTable = new JTable(tableModel);
>>> Any help is appreciated.
>>> Thanks in advance, Frank
>>> Btw.: thanks also for the great work with Rhino!
>> This looks like a bug. I've 
>> createdhttps://bugzilla.mozilla.org/show_bug.cgi?id=437988
>> and will try to look at it soon.
>>
>> --N
> 
> I just committed a fix to CVS. The problem was that Rhino wasn't
> discovering abstract methods if they were only defined in interfaces
> of base classes rather than the base classes themselves.
> 
> --N

Thanks for the quick fix, works now!

Regards, Frank
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to