Fuel and Bloc: error on materializing
The code below works but it turns out the error "Message Not Understood: receiver of" noticeMouseOver "is nil" when the mouse passes over the morph. | container materializedObject objectToSerlialize | container := BlMorph new withRectangleViewDo: [ :v | v extent: 200@200. v color: Color lightCyan ]. objectToSerlialize := BlMorph new withRectangleViewDo: [ :v | v extent: 20@20. v color: Color blue]. container openInWorld. container addMorphCentered: objectToSerlialize. self confirm: 'Save?'. FLSerializer serialize: objectToSerlialize toFileNamed: 'demo.fuel'. self confirm: 'Delete?'. objectToSerlialize delete. self confirm: 'Restore?'. materializedObject := FLMaterializer materializeFromFileNamed: 'demo.fuel'. container addMorph: materializedObject The code can also be seen in http://ws.stfx.eu/JX06871AMDH0. ----- http://chicoary@gmail.com -- View this message in context: http://forum.world.st/Fuel-and-Bloc-error-on-materializing-tp4862550.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
I found that the materialized object did not have a reference to the Bloc space. With the line of code introduced below the error disappeared. | container materializedObject objectToSerlialize | container := BlMorph new withRectangleViewDo: [ :v | v extent: 200@200. v color: Color lightCyan ]. objectToSerlialize := BlMorph new withRectangleViewDo: [ :v | v extent: 20@20. v color: Color blue]. container openInWorld. container addMorphCentered: objectToSerlialize. self confirm: 'Save?'. FLSerializer serialize: objectToSerlialize toFileNamed: 'demo.fuel'. self confirm: 'Delete?'. objectToSerlialize delete. self confirm: 'Restore?'. materializedObject := FLMaterializer materializeFromFileNamed: 'demo.fuel'. "Restoring Bloc space" materializedObject space: container space. container addMorph: materializedObject ----- http://chicoary@gmail.com -- View this message in context: http://forum.world.st/Fuel-and-Bloc-error-on-materializing-tp4862550p4862577... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
participants (1)
-
chicoary