[Kde-java] Re: GCJ (Re: Build system for KDE4)

Thomas Zander zander at kde.org
Fri Jun 17 12:19:24 CEST 2005


On Friday 17 June 2005 10:44, Richard Dale wrote:
> Have you seen this comparison between the java-gnome bindings and the
> GTK# ones:
>
> http://people.redhat.com/~graydon/csharp-java/
>
> It seems the main difference is in the event listener stuff vs. csharp
> delegates. For QtJava we could add a similar layer of event listeners
> classes on top of the autogenerated bindings, probably based of
> QObject::eventFilters. Then it might look more familiar to a java
> programmer. I've never programmed event listeners, so I'm the wrong
> sort of person to judge whether they look 'more java-like', than
> signals/slots or subclassing event handling methods in QWidgets.

Signal/slot is a technology that requires a pre-compiler due to lack of 
introspection in C++.
In Java the introspection is there and it can be done, except that the 
SLOT() syntax with a function name in there is not possible since thats a 
macro.
Whats left is the option to type the method name as a string and on 
connection find out which method that is.
Signals; however are completely impossible in Java the way they are done 
in Qt. You need event broadcasters for that. an 'emit' keyword is 
unavailable.

I created a signal/slot equivalent in an open source Java framework since 
I was so frustrated by the standard way Java does things.  its a best of 
both worlds solution that probably would be nice to use in the bindings 
as well.
see:
http://uic.sf.net/api/20/uic/action/package-summary.html

The framework is very mature (been in use for years) and has features like 
multi-threading queues, action-locking and UI locking (sleepy pointer) 
for actions running in another thread, and much more.

-- 
Thomas Zander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-java/attachments/20050617/352046e6/attachment.pgp


More information about the Kde-java mailing list