too slowly to build JFace application via dsss, but cause unhandled runtime exception if compiled via dmd:
compile command:
dmd test.d -L/SUBSYSTEM:windows:5 -L/rc:dwt.res -release
unhanded runtime exception:
tango.core.Exception.IllegalElementException?: Attempt to include invalid key _in Collection
example code:
import
dwt.widgets.Display,
dwt.widgets.Shell,
dwt.DWT,
dwt.widgets.Control,
dwt.widgets.Composite,
dwt.widgets.Label,
dwtx.jface.window.ApplicationWindow;
debug import tango.util.log.Trace;
public class MyWindow : ApplicationWindow
{
this()
{
addMenuBar;
super(null);
}
void run()
{
setBlockOnOpen(true);
open();
Display.getCurrent.dispose;
}
protected Control createContents(Composite parent)
{
auto label = new Label(parent, DWT.CENTER);
label.setText("hello");
return label;
}
}
void main(char[][] args)
{
(new MyWindow).run;
}