changeset 186:0e2944da7cd0

Fix anon class problem
author Frank Benoit <benoit@tionex.de>
date Sun, 26 Oct 2008 13:59:03 +0100
parents 987b95661bb9
children 293a2f22f944
files dwtx/jface/text/TextViewer.d
diffstat 1 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/dwtx/jface/text/TextViewer.d	Sat Oct 18 15:02:49 2008 +0200
+++ b/dwtx/jface/text/TextViewer.d	Sun Oct 26 13:59:03 2008 +0100
@@ -2652,23 +2652,23 @@
             return;
 
         fNumberOfPostSelectionChangedEvents[0]++;
-        display.timerExec(getEmptySelectionChangedEventDelay(), dgRunnable( (int id, bool fireEqualSelection_) {
-            if (id is fNumberOfPostSelectionChangedEvents[0]) {
-                // Check again because this is executed after the delay
-                if (getDisplay() !is null)  {
-                    Point selection= fTextWidget.getSelectionRange();
-                    if (selection !is null) {
-                        IRegion r= widgetRange2ModelRange(new Region(selection.x, selection.y));
-                        if (fireEqualSelection_ || (r !is null && !(cast(Object)r).opEquals(cast(Object)fLastSentPostSelectionChange)) || r is null)  {
-                            fLastSentPostSelectionChange= r;
-                            firePostSelectionChanged(selection.x, selection.y);
-                        }
+        display.timerExec(getEmptySelectionChangedEventDelay(), dgRunnable( &queuePostSelectionChangedRunner, fNumberOfPostSelectionChangedEvents[0], fireEqualSelection));
+    }
+    private void queuePostSelectionChangedRunner(int id, bool fireEqualSelection_) {
+        if (id is fNumberOfPostSelectionChangedEvents[0]) {
+            // Check again because this is executed after the delay
+            if (getDisplay() !is null)  {
+                Point selection= fTextWidget.getSelectionRange();
+                if (selection !is null) {
+                    IRegion r= widgetRange2ModelRange(new Region(selection.x, selection.y));
+                    if (fireEqualSelection_ || (r !is null && !(cast(Object)r).opEquals(cast(Object)fLastSentPostSelectionChange)) || r is null)  {
+                        fLastSentPostSelectionChange= r;
+                        firePostSelectionChanged(selection.x, selection.y);
                     }
                 }
             }
-        }, fNumberOfPostSelectionChangedEvents[0], fireEqualSelection));
-    }
-
+        }
+    }
     /**
      * Sends out a text selection changed event to all registered post selection changed listeners.
      *