diff dwtx/ui/forms/MasterDetailsBlock.d @ 104:04b47443bb01

Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections. These new wrappers now use the tango.util.containers instead of the tango.util.collections.
author Frank Benoit <benoit@tionex.de>
date Thu, 07 Aug 2008 15:01:33 +0200
parents 5d489b9f966c
children c3583c6ec027
line wrap: on
line diff
--- a/dwtx/ui/forms/MasterDetailsBlock.d	Sun Aug 03 17:01:51 2008 +0200
+++ b/dwtx/ui/forms/MasterDetailsBlock.d	Thu Aug 07 15:01:33 2008 +0200
@@ -32,7 +32,7 @@
 import dwtx.ui.forms.widgets.ScrolledForm;
 
 import dwt.dwthelper.utils;
-import tango.util.collection.ArraySeq;
+import dwtx.dwtxhelper.Collection;
 
 /**
  * This class implements the 'master/details' UI pattern suitable for inclusion
@@ -77,10 +77,10 @@
     static const int DRAGGER_SIZE = 40;
 
     class MDSashForm : SashForm {
-        ArraySeq!(Sash) sashes;
+        ArrayList sashes;
         Listener listener;
         public this(Composite parent, int style) {
-            sashes = new ArraySeq!(Sash);
+            sashes = new ArrayList();
             listener = dgListener ( (Event e){
                 switch (e.type) {
                 case DWT.MouseEnter:
@@ -122,14 +122,15 @@
                     sash.addListener(DWT.Paint, listener);
                     sash.addListener(DWT.MouseEnter, listener);
                     sash.addListener(DWT.MouseExit, listener);
-                    sashes.append(sash);
+                    sashes.add(sash);
                 }
             }
         }
         private void purgeSashes() {
-            foreach ( sash; sashes.dup ) {
+            for (Iterator iter=sashes.iterator(); iter.hasNext();) {
+                Sash sash = cast(Sash)iter.next();
                 if (sash.isDisposed())
-                    sashes.remove(sash);
+                    iter.remove();
             }
         }
     }