Form.st
changeset 126 4fc31fd808c8
parent 118 25e775072a89
child 127 98b0725782bd
--- a/Form.st	Sun Mar 26 22:14:10 1995 +0200
+++ b/Form.st	Wed Mar 29 12:49:42 1995 +0200
@@ -16,8 +16,7 @@
 			   DarkGreyForm VeryDarkGreyForm
 
 			   AdditionalBitmapDirectoryNames
-			   BlackAndWhiteColorMap DitherPatternArray
-			   Lobby'
+			   BlackAndWhiteColorMap DitherPatternArray'
        poolDictionaries:''
        category:'Graphics-Display Objects'
 !
@@ -26,7 +25,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libview/Form.st,v 1.21 1995-03-18 05:11:05 claus Exp $
+$Header: /cvs/stx/stx/libview/Form.st,v 1.22 1995-03-29 10:49:42 claus Exp $
 '!
 
 !Form class methodsFor:'documentation'!
@@ -47,7 +46,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libview/Form.st,v 1.21 1995-03-18 05:11:05 claus Exp $
+$Header: /cvs/stx/stx/libview/Form.st,v 1.22 1995-03-29 10:49:42 claus Exp $
 "
 !
 
@@ -62,16 +61,13 @@
 !Form class methodsFor:'initialization'!
 
 initialize
-    "initialize set of dictionaries to look for bitmaps
-     and Lobby to keep track of dead forms"
+    "initialize set of dictionaries to look for bitmaps"
 
     AdditionalBitmapDirectoryNames isNil ifTrue:[
 	super initialize.
 
 	AdditionalBitmapDirectoryNames := #('/usr/lib/X11/bitmaps').
     
-	Lobby := Registry new.
-
 	"want to be informed when returning from snapshot"
 	ObjectMemory addDependent:self.
     ]
@@ -83,8 +79,10 @@
 
     Lobby do:[:aForm |
 	(aForm device == aDevice) ifTrue:[
-	    "now, try to recreate it"
-	    aForm recreate.
+	    (aForm class == self) ifTrue:[
+		"now, try to recreate it"
+		aForm recreate.
+	    ]
 	]
     ]
 !
@@ -95,14 +93,18 @@
     (something == #save) ifTrue:[
 	"get all bits from the device into saveable arrays"
 	Lobby do:[:aForm |
-	    aForm getBits
+	    (aForm class == self) ifTrue:[
+		aForm getBits
+	    ]
 	]
     ].
     (something == #restarted) ifTrue:[
 	"remove all left-over device info"
 	Lobby do:[:aForm |
-	    aForm restored.
-	    Lobby changed:self
+	    (aForm class == self) ifTrue:[
+		aForm restored.
+		Lobby changed:aForm 
+	    ]
 	]
     ]
 ! !
@@ -1381,8 +1383,9 @@
     "stop server from sending exposure events for Forms -
      (will fill up stream-queue on some stupid (i.e. sco) systems"
 
-    self createGC.
-    Lobby changed:self.
+    super initGC.
+"/    self createGC.
+"/    Lobby changed:self.
     self setGraphicsExposures:false
 !
 
@@ -1427,7 +1430,7 @@
 
     super readBinaryContentsFrom: stream manager: manager.
     self restored.
-    Lobby register:self
+    Lobby register:self.
 ! !
 
 !Form methodsFor:'getting a device form'!
@@ -1505,7 +1508,7 @@
     ].
     localColorMap := BlackAndWhiteColorMap.
     realized := true.
-    Lobby register:self
+    Lobby changed:self.
 !
 
 width:w height:h depth:d
@@ -1518,7 +1521,7 @@
     drawableId isNil ifTrue:[^ nil].
     realized := true.
     depth := d.
-    Lobby register:self
+    Lobby changed:self.
 !
 
 width:w height:h fromArray:anArray
@@ -1570,7 +1573,7 @@
     ].
     localColorMap := BlackAndWhiteColorMap.
     realized := true.
-    Lobby register:self
+    Lobby changed:self.
 !
 
 width:w height:h offset:offs fromArray:anArray
@@ -1597,7 +1600,7 @@
 	    BlackAndWhiteColorMap := Array with:(Color white) with:(Color black)
 	].
 	localColorMap := BlackAndWhiteColorMap.
-	Lobby register:self.
+	Lobby changed:self.
 	^ self
     ].
     ^ nil