View previous topic :: View next topic |
Author |
Message |
torhu
Joined: 30 Mar 2006 Posts: 56
|
Posted: Wed Apr 18, 2007 4:31 pm Post subject: problem with the Runnable interface |
|
|
When compiling this code:
Code: | display.syncExec(new class Runnable {
void run() { serverTable.refresh(new IntWrapper(index)); }
}); |
I get these errors:
serverlist.d(142): class serverlist.ServerList.add.__anonclass41 interface function Runnable.getClass isn't implemented
serverlist.d(142): class serverlist.ServerList.add.__anonclass41 interface function Runnable.hashCode isn't implemented
serverlist.d(142): class serverlist.ServerList.add.__anonclass41 interface function Runnable.equals isn't implemented
serverlist.d(142): class serverlist.ServerList.add.__anonclass41 interface function Runnable.clone isn't implemented
serverlist.d(142): class serverlist.ServerList.add.__anonclass41 interface function Runnable.toString isn't implemented
serverlist.d(142): class serverlist.ServerList.add.__anonclass41 interface function Runnable.notify isn't implemented
serverlist.d(142): class serverlist.ServerList.add.__anonclass41 interface function Runnable.notifyAll isn't implemented
serverlist.d(142): class serverlist.ServerList.add.__anonclass41 interface function Runnable.wait isn't implemented
serverlist.d(142): class serverlist.ServerList.add.__anonclass41 interface function Runnable.wait isn't implemented
serverlist.d(142): class serverlist.ServerList.add.__anonclass41 interface function Runnable.wait isn't implemented
serverlist.d(142): class serverlist.ServerList.add.__anonclass41 interface function Runnable.finalize isn't implemented |
|
Back to top |
|
|
keinfarbton
Joined: 03 Dec 2005 Posts: 224 Location: Stuttgart - Germany
|
Posted: Thu Apr 19, 2007 4:03 pm Post subject: |
|
|
Sorry for the delay.
If you implement and Java derived interface you need to make the class also to derive from class JObjectImpl in module dejavu.lang.JObjectImpl.
This makes your code look like this:
Code: | display.syncExec(new class JObjectImpl, Runnable {
void run() { serverTable.refresh(new IntWrapper(index)); }
}); |
While writing this, i added also a little doc about that. See http://www.dsource.org/projects/tioport/wiki/dejavu#ObjectsandInterfaces |
|
Back to top |
|
|
|