Only set `Dialog` global to `DialogBox` if not already set jv
authorJan Vrany <jan.vrany@labware.com>
Fri, 02 Sep 2022 11:33:22 +0100
branchjv
changeset 6858 0e59faa94098
parent 6857 58d68f671fa1
child 6859 75468b4f0414
Only set `Dialog` global to `DialogBox` if not already set This allows other packages to set custom `Dialog` objects.
DialogBox.st
--- a/DialogBox.st	Fri Aug 12 22:38:28 2022 +0100
+++ b/DialogBox.st	Fri Sep 02 11:33:22 2022 +0100
@@ -1,6 +1,7 @@
 "
  COPYRIGHT (c) 1994 by Claus Gittinger
  COPYRIGHT (c) 2018 Jan Vrany
+ COPYRIGHT (c) 2022 LabWare
               All Rights Reserved
 
  This software is furnished under a license and may be used
@@ -31,6 +32,7 @@
 "
  COPYRIGHT (c) 1994 by Claus Gittinger
  COPYRIGHT (c) 2018 Jan Vrany
+ COPYRIGHT (c) 2022 LabWare
               All Rights Reserved
 
  This software is furnished under a license and may be used
@@ -1094,7 +1096,7 @@
 !DialogBox class methodsFor:'class initialization'!
 
 initialize
-    self == DialogBox ifTrue:[
+    (self == DialogBox and:[Dialog isNil]) ifTrue:[
         "/ do this for ST-80 compatibility 
         "/ (and in the meantime also for my own compatibility..)
         Dialog := self
@@ -1104,6 +1106,8 @@
 
     "/ for backward whitebox compatibility (customer subclasses which access the classVar directly)
     AboutToOpenBoxNotificationSignal := SimpleView aboutToOpenBoxNotificationSignal
+
+    "Modified: / 02-09-2022 / 11:30:05 / Jan Vrany <jan.vrany@labware.com>"
 ! !
 
 !DialogBox class methodsFor:'common dialogs'!
@@ -6828,7 +6832,6 @@
     "
 ! !
 
-
 !DialogBox methodsFor:'accessing-behavior'!
 
 abortAction:aBlock