FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

problem with the Runnable interface

 
Post new topic   Reply to topic     Forum Index -> Tioport
View previous topic :: View next topic  
Author Message
torhu



Joined: 30 Mar 2006
Posts: 56

PostPosted: Wed Apr 18, 2007 4:31 pm    Post subject: problem with the Runnable interface Reply with quote

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
View user's profile Send private message
keinfarbton



Joined: 03 Dec 2005
Posts: 224
Location: Stuttgart - Germany

PostPosted: Thu Apr 19, 2007 4:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Tioport All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group