--- a/Form.st Tue Feb 04 14:27:55 2014 +0100
+++ b/Form.st Tue Feb 04 14:42:46 2014 +0100
@@ -1707,16 +1707,16 @@
recreate
"reconstruct the form after a snapin or a migration"
- device isNil ifTrue:[^ self].
+ self device isNil ifTrue:[^ self].
data notNil ifTrue:[
"
create one from data
"
(depth == 1 or:[depth == device depth]) ifTrue:[
- drawableId := device createBitmapFromArray:data width:width height:height.
+ self createBitmapFromArray:data width:width height:height.
Lobby registerChange:self.
- drawableId notNil ifTrue:[
+ self drawableId notNil ifTrue:[
^ self
]
].
@@ -1730,7 +1730,7 @@
"/ drawableId := device createBitmapFromFile:fileName for:self.
"/ Lobby registerChange:self.
- drawableId notNil ifTrue:[
+ self drawableId notNil ifTrue:[
^ self
].
'FORM: cannot recreate file form: ' errorPrint. fileName errorPrintCR.
@@ -2020,8 +2020,21 @@
]
]
].
- self width:w height:h depth:1.
data := bytes.
+ width := w.
+ height := h.
+ depth := 1.
+ offset := 0@0.
+ BlackAndWhiteColorMap isNil ifTrue:[
+ BlackAndWhiteColorMap := Array with:(Color white) with:(Color black)
+ ].
+ localColorMap := BlackAndWhiteColorMap.
+
+ device notNil ifTrue:[
+ self createBitmapFromArray:bytes width:w height:h.
+ realized := true.
+ Lobby registerChange:self.
+ ].
!
width:w height:h offset:offs fromArray:anArray
@@ -2193,7 +2206,7 @@
!Form class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Form.st,v 1.147 2014-02-04 13:27:19 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Form.st,v 1.148 2014-02-04 13:42:46 stefan Exp $'
! !