startupWith:startupAction
authorClaus Gittinger <cg@exept.de>
Fri, 20 Aug 1999 11:32:44 +0200
changeset 2851 c43fdd39d2e5
parent 2850 cac9758df2ca
child 2852 4eb0bb90d703
startupWith:startupAction setup the process and its actions before resume
WGroup.st
WindowGroup.st
--- a/WGroup.st	Wed Aug 18 22:52:07 1999 +0200
+++ b/WGroup.st	Fri Aug 20 11:32:44 1999 +0200
@@ -800,61 +800,64 @@
     previousGroup := nil.
 
     myProcess isNil ifTrue:[
-	isModal := false.
+        isModal := false.
 
-	"/
-	"/ this is the windowGroup process;
-	"/ realize all views, then handle events forever
-	"/ (well, not really forever ... ;-)
+        "/
+        "/ this is the windowGroup process;
+        "/ realize all views, then handle events forever
+        "/ (well, not really forever ... ;-)
 
-	myProcess := [
-	    WindowGroupQuerySignal handle:[:ex |
-		ex proceedWith:self
-	    ] do:[
-		[
-		    startupAction value.
-		    self eventLoopWhile:[true] onLeave:[]
-		] valueNowOrOnUnwindDo:[
-		    self closeDownViews
-		]
-	    ]
-	] forkAt:(Processor userSchedulingPriority).
+        myProcess := [
+            WindowGroupQuerySignal handle:[:ex |
+                ex proceedWith:self
+            ] do:[
+                [
+                    startupAction value.
+                    self eventLoopWhile:[true] onLeave:[]
+                ] valueNowOrOnUnwindDo:[
+                    self closeDownViews
+                ]
+            ]
+        ] newProcess.
+        myProcess priority:(Processor userSchedulingPriority).
 
-	(topViews size > 0) ifTrue:[
-	    "/
-	    "/ give the windowGroup process a user friendly name
-	    "/ ask its topView for the processName, and
-	    "/ optionally append the displayName (if its not the default)
-	    "/
-	    top := topViews first.
-	    nm := top processName.
+        (topViews size > 0) ifTrue:[
+            "/
+            "/ give the windowGroup process a user friendly name
+            "/ ask its topView for the processName, and
+            "/ optionally append the displayName (if its not the default)
+            "/
+            top := topViews first.
+            nm := top processName.
 
-	    (dev := top graphicsDevice) notNil ifTrue:[
-		devNm := dev displayName.
-		(devNm notNil and:[devNm ~= Display displayName]) ifTrue:[
-		    nm := nm , ' (' , devNm , ')'
-		]
-	    ]
-	] ifFalse:[
-	    nm := 'window handler'.
-	].
-	myProcess name:nm.
-	myProcess beGroupLeader.
+            (dev := top graphicsDevice) notNil ifTrue:[
+                devNm := dev displayName.
+                (devNm notNil and:[devNm ~= Display displayName]) ifTrue:[
+                    nm := nm , ' (' , devNm , ')'
+                ]
+            ]
+        ] ifFalse:[
+            nm := 'window handler'.
+        ].
+        myProcess name:nm.
+        myProcess beGroupLeader.
 
-	"/
-	"/ when the process gets suspended, 
-	"/ there maybe still buffered draw requests.
-	"/ Arrange for them to be flushed then.
-	"/ (otherwise, you would not see the output of a process,
-	"/  which suspends and waits - or we had to add buffer flushes
-	"/  all over the place)
-	"/
-	myProcess addSuspendAction:[ 
-	    |dev|
+        "/
+        "/ when the process gets suspended, 
+        "/ there maybe still buffered draw requests.
+        "/ Arrange for them to be flushed then.
+        "/ (otherwise, you would not see the output of a process,
+        "/  which suspends and waits - or we had to add buffer flushes
+        "/  all over the place)
+        "/
+        myProcess addSuspendAction:[ 
+            |dev|
 
-	    dev := self graphicsDevice.
-	    dev notNil ifTrue:[dev flush].
-	].
+            dev := self graphicsDevice.
+            dev notNil ifTrue:[dev flush].
+        ].
+
+        myProcess resume.
     ]
 
     "Modified: / 13.12.1995 / 14:04:53 / stefan"
@@ -2084,6 +2087,6 @@
 !WindowGroup class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Attic/WGroup.st,v 1.178 1999-08-02 08:57:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Attic/WGroup.st,v 1.179 1999-08-20 09:32:44 cg Exp $'
 ! !
 WindowGroup initialize!
--- a/WindowGroup.st	Wed Aug 18 22:52:07 1999 +0200
+++ b/WindowGroup.st	Fri Aug 20 11:32:44 1999 +0200
@@ -800,61 +800,64 @@
     previousGroup := nil.
 
     myProcess isNil ifTrue:[
-	isModal := false.
+        isModal := false.
 
-	"/
-	"/ this is the windowGroup process;
-	"/ realize all views, then handle events forever
-	"/ (well, not really forever ... ;-)
+        "/
+        "/ this is the windowGroup process;
+        "/ realize all views, then handle events forever
+        "/ (well, not really forever ... ;-)
 
-	myProcess := [
-	    WindowGroupQuerySignal handle:[:ex |
-		ex proceedWith:self
-	    ] do:[
-		[
-		    startupAction value.
-		    self eventLoopWhile:[true] onLeave:[]
-		] valueNowOrOnUnwindDo:[
-		    self closeDownViews
-		]
-	    ]
-	] forkAt:(Processor userSchedulingPriority).
+        myProcess := [
+            WindowGroupQuerySignal handle:[:ex |
+                ex proceedWith:self
+            ] do:[
+                [
+                    startupAction value.
+                    self eventLoopWhile:[true] onLeave:[]
+                ] valueNowOrOnUnwindDo:[
+                    self closeDownViews
+                ]
+            ]
+        ] newProcess.
+        myProcess priority:(Processor userSchedulingPriority).
 
-	(topViews size > 0) ifTrue:[
-	    "/
-	    "/ give the windowGroup process a user friendly name
-	    "/ ask its topView for the processName, and
-	    "/ optionally append the displayName (if its not the default)
-	    "/
-	    top := topViews first.
-	    nm := top processName.
+        (topViews size > 0) ifTrue:[
+            "/
+            "/ give the windowGroup process a user friendly name
+            "/ ask its topView for the processName, and
+            "/ optionally append the displayName (if its not the default)
+            "/
+            top := topViews first.
+            nm := top processName.
 
-	    (dev := top graphicsDevice) notNil ifTrue:[
-		devNm := dev displayName.
-		(devNm notNil and:[devNm ~= Display displayName]) ifTrue:[
-		    nm := nm , ' (' , devNm , ')'
-		]
-	    ]
-	] ifFalse:[
-	    nm := 'window handler'.
-	].
-	myProcess name:nm.
-	myProcess beGroupLeader.
+            (dev := top graphicsDevice) notNil ifTrue:[
+                devNm := dev displayName.
+                (devNm notNil and:[devNm ~= Display displayName]) ifTrue:[
+                    nm := nm , ' (' , devNm , ')'
+                ]
+            ]
+        ] ifFalse:[
+            nm := 'window handler'.
+        ].
+        myProcess name:nm.
+        myProcess beGroupLeader.
 
-	"/
-	"/ when the process gets suspended, 
-	"/ there maybe still buffered draw requests.
-	"/ Arrange for them to be flushed then.
-	"/ (otherwise, you would not see the output of a process,
-	"/  which suspends and waits - or we had to add buffer flushes
-	"/  all over the place)
-	"/
-	myProcess addSuspendAction:[ 
-	    |dev|
+        "/
+        "/ when the process gets suspended, 
+        "/ there maybe still buffered draw requests.
+        "/ Arrange for them to be flushed then.
+        "/ (otherwise, you would not see the output of a process,
+        "/  which suspends and waits - or we had to add buffer flushes
+        "/  all over the place)
+        "/
+        myProcess addSuspendAction:[ 
+            |dev|
 
-	    dev := self graphicsDevice.
-	    dev notNil ifTrue:[dev flush].
-	].
+            dev := self graphicsDevice.
+            dev notNil ifTrue:[dev flush].
+        ].
+
+        myProcess resume.
     ]
 
     "Modified: / 13.12.1995 / 14:04:53 / stefan"
@@ -2084,6 +2087,6 @@
 !WindowGroup class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.178 1999-08-02 08:57:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.179 1999-08-20 09:32:44 cg Exp $'
 ! !
 WindowGroup initialize!