class: Notification
authorClaus Gittinger <cg@exept.de>
Mon, 25 Mar 2013 14:57:51 +0100
changeset 14948 c792f4a1ceea
parent 14947 e9a0049c0ef1
child 14949 db71d89dd7f3
class: Notification moved: #hasDialog
Notification.st
--- a/Notification.st	Mon Mar 25 13:26:12 2013 +0100
+++ b/Notification.st	Mon Mar 25 14:57:51 2013 +0100
@@ -313,6 +313,23 @@
     "Modified: / 23.7.1999 / 15:13:34 / stefan"
 ! !
 
+!Notification methodsFor:'helpers'!
+
+hasDialog
+    "answer true, if we can use a Dialog window"
+
+    (Smalltalk isInitialized 
+     and:[Dialog notNil
+     and:[Screen notNil
+     and:[Screen current notNil
+     and:[Screen current isOpenAndDispatching
+    ]]]]) ifTrue:[
+        Dialog autoload.        "in case its autoloaded"
+        ^ true.
+    ].
+    ^ false
+! !
+
 !Notification methodsFor:'private'!
 
 LATERdoCallHandler:aHandlerBlock
@@ -358,11 +375,12 @@
 !Notification class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Notification.st,v 1.27 2011-09-11 14:41:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Notification.st,v 1.28 2013-03-25 13:57:51 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Notification.st,v 1.27 2011-09-11 14:41:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Notification.st,v 1.28 2013-03-25 13:57:51 cg Exp $'
 ! !
 
+
 Notification initialize!