--- a/SimpleView.st Sat Mar 20 16:43:19 2004 +0100
+++ b/SimpleView.st Mon Mar 22 16:55:14 2004 +0100
@@ -9346,45 +9346,45 @@
another view (which is only available once visible),
use this to suspend the current process until the receiver is shown.
Caveat:
- we poll here for the view to be shown - we need a semaphore
- which is raised by the view in order to do it right."
+ we poll here for the view to be shown - we need a semaphore
+ which is raised by the view in order to do it right."
|wg n|
n := 0.
[self shown] whileFalse:[
- (device notNil and:[device isOpen not]) ifTrue:[^ self].
-
- "/ this was added to avoid a deadlock, when called from within
- "/ the event dispatch process (as when doing foo inspect there).
- n > (10 / 0.05) ifTrue:[
- 'View not visible after 10 seconds - will not wait any longer' errorPrintCR.
- ^ self
- ].
- n := n + 1.
- Delay waitForSeconds:0.05.
- (wg := self windowGroup) ifNotNil:[
- wg processExposeEvents.
- ].
+ (device notNil and:[device isOpen not]) ifTrue:[^ self].
+
+ "/ this was added to avoid a deadlock, when called from within
+ "/ the event dispatch process (as when doing foo inspect there).
+ n > (10 / 0.05) ifTrue:[
+ 'View not visible after 10 seconds - will not wait any longer in waitUntilVisible' infoPrintCR.
+ ^ self
+ ].
+ n := n + 1.
+ Delay waitForSeconds:0.05.
+ (wg := self windowGroup) ifNotNil:[
+ wg processExposeEvents.
+ ].
].
"does not work (the view is in its opening phase,
when we attempt to draw a line - this gives an error, since
its internals are not yet correctly setup):
- |v|
-
- v := View new open.
- v displayLineFrom:0@0 to:50@50
+ |v|
+
+ v := View new open.
+ v displayLineFrom:0@0 to:50@50
does work (since we wait until the view has completely finished
its startup phase):
- |v|
-
- v := View new open.
- v waitUntilVisible.
- v displayLineFrom:0@0 to:50@50
+ |v|
+
+ v := View new open.
+ v waitUntilVisible.
+ v displayLineFrom:0@0 to:50@50
"
! !
@@ -9469,7 +9469,7 @@
!SimpleView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.492 2004-03-12 12:28:29 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.493 2004-03-22 15:55:14 cg Exp $'
! !
SimpleView initialize!