ApplicationModel.st
changeset 2556 7b4fce0b3b2a
parent 2555 00f13ac6228b
child 2557 3bb3a6706ad6
--- a/ApplicationModel.st	Wed Oct 22 01:07:37 2008 +0200
+++ b/ApplicationModel.st	Wed Oct 22 01:08:23 2008 +0200
@@ -1619,83 +1619,6 @@
     self buildSpec:specToBuild asSubCanvasWithBuilder:aBuilder
 ! !
 
-!ApplicationModel methodsFor:'change & update'!
-
-delayedUpdate:something with:aParameter from:changedObject
-    "support for delayed updates - 
-     subclasses which invoke #enqueueDelayedUpdate:with:from: (from #update:with:from:)
-     must also redefine this method, and perform the actual update there."
-
-    ^ self
-!
-
-enqueueDelayedAction:aBlock
-    "This will enqueue a delayed action - the application-process will
-     eventually execute aBlock.
-     Useful for synchronization"
-
-    ^ self
-        enqueueMessage:#value
-        for:aBlock
-        arguments:#().
-
-    "Modified: / 26.2.2000 / 18:01:44 / cg"
-!
-
-enqueueDelayedUpdate:something with:aParameter from:changedObject
-    "support for delayed updates - to be invoked from a concrete classes
-     #update:with:from: method.
-     This will enqueue a delayed update, and resend #delayedUpdate:with:from:
-     whenever the receiver is handling events.
-     Especially useful, if many updates arrive at high frequency, to avoid
-     multiple redraws."
-
-    ^ self
-        enqueueMessage:#delayedUpdate:with:from:
-        for:self
-        arguments:(Array 
-                        with:something 
-                        with:aParameter 
-                        with:changedObject).
-
-    "Modified: / 26.2.2000 / 18:01:44 / cg"
-!
-
-enqueueMessage:selector for:someone arguments:argList
-    "enqueue a message to be sent to myself later, when my process
-     is back in its eventLoop. Also, filter duplicates.
-     This is useful, to buffer redraws and avoid flicker due to multiple
-     redraws (especially in browsers, when reacting on changeMessages resulting
-     from changes made in other browsers)"
-
-    |window sensor|
-
-    (window := self window) notNil ifTrue:[
-        sensor := window sensor.
-    ].
-
-    sensor isNil ifTrue:[
-        "no window (yet or any longer)"
-        someone perform:selector withArguments:argList.
-        ^ self.
-    ].
-
-
-    "/
-    "/ if such a message is already in the queue, ignore it.
-    "/ Otherwise push it as an event, to be handled when my thread is
-    "/ back in the event loop.
-    "/
-    sensor synchronized:[
-        (sensor hasEvent:selector for:someone withArguments:argList) ifFalse:[
-            sensor pushUserEvent:selector for:someone withArguments:argList
-        ].
-    ].
-
-    "Modified: / 5.2.2000 / 00:01:54 / cg"
-    "Created: / 26.2.2000 / 18:01:31 / cg"
-! !
-
 !ApplicationModel methodsFor:'component manipulations'!
 
 components:aSymbolOrArray do:aBlock
@@ -1792,6 +1715,83 @@
     "Created: / 19.4.1998 / 11:44:44 / cg"
 ! !
 
+!ApplicationModel methodsFor:'delayed actions (enqueue)'!
+
+delayedUpdate:something with:aParameter from:changedObject
+    "support for delayed updates - 
+     subclasses which invoke #enqueueDelayedUpdate:with:from: (from #update:with:from:)
+     must also redefine this method, and perform the actual update there."
+
+    ^ self
+!
+
+enqueueDelayedAction:aBlock
+    "This will enqueue a delayed action - the application-process will
+     eventually execute aBlock.
+     Useful for synchronization"
+
+    ^ self
+        enqueueMessage:#value
+        for:aBlock
+        arguments:#().
+
+    "Modified: / 26.2.2000 / 18:01:44 / cg"
+!
+
+enqueueDelayedUpdate:something with:aParameter from:changedObject
+    "support for delayed updates - to be invoked from a concrete classes
+     #update:with:from: method.
+     This will enqueue a delayed update, and resend #delayedUpdate:with:from:
+     whenever the receiver is handling events.
+     Especially useful, if many updates arrive at high frequency, to avoid
+     multiple redraws."
+
+    ^ self
+        enqueueMessage:#delayedUpdate:with:from:
+        for:self
+        arguments:(Array 
+                        with:something 
+                        with:aParameter 
+                        with:changedObject).
+
+    "Modified: / 26.2.2000 / 18:01:44 / cg"
+!
+
+enqueueMessage:selector for:someone arguments:argList
+    "enqueue a message to be sent to myself later, when my process
+     is back in its eventLoop. Also, filter duplicates.
+     This is useful, to buffer redraws and avoid flicker due to multiple
+     redraws (especially in browsers, when reacting on changeMessages resulting
+     from changes made in other browsers)"
+
+    |window sensor|
+
+    (window := self window) notNil ifTrue:[
+        sensor := window sensor.
+    ].
+
+    sensor isNil ifTrue:[
+        "no window (yet or any longer)"
+        someone perform:selector withArguments:argList.
+        ^ self.
+    ].
+
+
+    "/
+    "/ if such a message is already in the queue, ignore it.
+    "/ Otherwise push it as an event, to be handled when my thread is
+    "/ back in the event loop.
+    "/
+    sensor synchronized:[
+        (sensor hasEvent:selector for:someone withArguments:argList) ifFalse:[
+            sensor pushUserEvent:selector for:someone withArguments:argList
+        ].
+    ].
+
+    "Modified: / 5.2.2000 / 00:01:54 / cg"
+    "Created: / 26.2.2000 / 18:01:31 / cg"
+! !
+
 !ApplicationModel methodsFor:'drag & drop'!
 
 canDropObjects:aCollectionOfDropObjects in:aComponent
@@ -3410,7 +3410,7 @@
 !ApplicationModel class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.268 2008-10-21 23:07:37 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.269 2008-10-21 23:08:23 cg Exp $'
 ! !
 
 ApplicationModel initialize!