diff dwt/widgets/Dialog.d @ 15:2952d5604c0a

Ported some widgets, added some stuff to the runtime bindings
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Fri, 29 Aug 2008 21:46:05 +0200
parents 380af2bdd8e5
children 5b53d338c709
line wrap: on
line diff
--- a/dwt/widgets/Dialog.d	Sat Aug 23 13:49:00 2008 +0200
+++ b/dwt/widgets/Dialog.d	Fri Aug 29 21:46:05 2008 +0200
@@ -7,15 +7,21 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *     Jacob Carlborg <jacob.carlborg@gmail.com>
  *******************************************************************************/
 module dwt.widgets.Dialog;
 
-import dwt.dwthelper.utils;
-
 
 import dwt.DWT;
 import dwt.DWTException;
 
+import dwt.dwthelper.utils;
+import dwt.widgets.Display;
+import dwt.widgets.Shell;
+import dwt.widgets.Widget;
+
 /**
  * This class is the abstract superclass of the classes
  * that represent the built in platform dialogs.
@@ -94,7 +100,7 @@
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li>
  * </ul>
  */
-public Dialog (Shell parent) {
+public this (Shell parent) {
     this (parent, DWT.PRIMARY_MODAL);
 }
 
@@ -124,7 +130,7 @@
  * @see DWT#APPLICATION_MODAL
  * @see DWT#SYSTEM_MODAL
  */
-public Dialog (Shell parent, int style) {
+public this (Shell parent, int style) {
     checkParent (parent);
     this.parent = parent;
     this.style = style;
@@ -144,7 +150,7 @@
  * @see Widget#checkSubclass
  */
 protected void checkSubclass () {
-    if (!Display.isValidClass (getClass ())) {
+    if (!Display.isValidClass (this.classinfo)) {
         error (DWT.ERROR_INVALID_SUBCLASS);
     }
 }
@@ -256,7 +262,7 @@
  * </ul>
  */
 public void setText (String string) {
-    if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
+    //if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
     title = string;
 }