Compiling the hello world example fails (2)
Jacob Carlborg
doob at me.com
Thu Sep 12 23:31:26 PDT 2013
On 2013-09-12 19:28, Anton Alexeev wrote:
> Found out how to handle events:
>
> class DisposeListenerImpl:DisposeListener{
> public void widgetDisposed(DisposeEvent e) {
> writeln("Disposed");
> }
> }
>
> shell.addDisposeListener(new DisposeListenerImpl);
>
>
> Is this the right way?
Yes, that's the standard SWT/Java way. You should be able to use a
delegate as well. See:
https://github.com/d-widget-toolkit/org.eclipse.swt.gtk.linux.x86/blob/master/src/org/eclipse/swt/widgets/Listener.d#L103
The same exist for Runnable as well:
http://www.dsource.org/projects/dwt/wiki/DiffToOriginal#ThingsaddedorchangedinDWT:
--
/Jacob Carlborg
More information about the Digitalmars-d-dwt
mailing list