# HG changeset patch # User Frank Benoit # Date 1200939370 -3600 # Node ID 31981a851d5b07ade3e45e54e5d935ed64d9e45d # Parent 0f8bb00f569eaccf3c325fa219484d3dbfbd9d4a ControlExample shelltab close handler diff -r 0f8bb00f569e -r 31981a851d5b dwtexamples/controlexample/AlignableTab.d --- a/dwtexamples/controlexample/AlignableTab.d Mon Jan 21 19:04:50 2008 +0100 +++ b/dwtexamples/controlexample/AlignableTab.d Mon Jan 21 19:16:10 2008 +0100 @@ -7,6 +7,8 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Port to the D programming language: + * Frank Benoit *******************************************************************************/ module dwtexamples.controlexample.AlignableTab; diff -r 0f8bb00f569e -r 31981a851d5b dwtexamples/controlexample/ButtonTab.d --- a/dwtexamples/controlexample/ButtonTab.d Mon Jan 21 19:04:50 2008 +0100 +++ b/dwtexamples/controlexample/ButtonTab.d Mon Jan 21 19:16:10 2008 +0100 @@ -7,6 +7,8 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Port to the D programming language: + * Frank Benoit *******************************************************************************/ module dwtexamples.controlexample.ButtonTab; diff -r 0f8bb00f569e -r 31981a851d5b dwtexamples/controlexample/ControlExample.d --- a/dwtexamples/controlexample/ControlExample.d Mon Jan 21 19:04:50 2008 +0100 +++ b/dwtexamples/controlexample/ControlExample.d Mon Jan 21 19:16:10 2008 +0100 @@ -7,7 +7,9 @@ * * Contributors: * IBM Corporation - initial API and implementation - *******************************************************************************/ + * Port to the D programming language: + * Frank Benoit +*******************************************************************************/ module dwtexamples.controlexample.ControlExample; pragma( msg, " === The ControlExample is work in progress ===" ); diff -r 0f8bb00f569e -r 31981a851d5b dwtexamples/controlexample/ShellTab.d --- a/dwtexamples/controlexample/ShellTab.d Mon Jan 21 19:04:50 2008 +0100 +++ b/dwtexamples/controlexample/ShellTab.d Mon Jan 21 19:16:10 2008 +0100 @@ -7,7 +7,9 @@ * * Contributors: * IBM Corporation - initial API and implementation - *******************************************************************************/ + * Port to the D programming language: + * Frank Benoit +*******************************************************************************/ module dwtexamples.controlexample.ShellTab; @@ -99,15 +101,17 @@ } else { shells [shellCount] = new Shell (shell, style); } - final Shell currentShell = shells [shellCount]; + Shell currentShell = shells [shellCount]; Button button = new Button(currentShell, DWT.PUSH); button.setBounds(20, 20, 120, 30); Button closeButton = new Button(currentShell, DWT.PUSH); closeButton.setBounds(160, 20, 120, 30); closeButton.setText(ControlExample.getResourceString("Close")); - closeButton.addListener(DWT.Selection, new class() Listener { + closeButton.addListener(DWT.Selection, new class(currentShell) Listener { + Shell s; + this( Shell s ){ this.s = s; } public void handleEvent(Event event) { - currentShell.dispose(); + s.dispose(); } }); diff -r 0f8bb00f569e -r 31981a851d5b dwtexamples/controlexample/Tab.d --- a/dwtexamples/controlexample/Tab.d Mon Jan 21 19:04:50 2008 +0100 +++ b/dwtexamples/controlexample/Tab.d Mon Jan 21 19:16:10 2008 +0100 @@ -7,6 +7,8 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Port to the D programming language: + * Frank Benoit *******************************************************************************/ module dwtexamples.controlexample.Tab;