Storing morphs displayed in the world in a GOODS db
John Pierce
john.raymond.pierce at gmail.com
Thu Sep 23 16:32:05 UTC 2004
Hi all,
> I wish I could provide a suggestion or possible fix, but does anyone
> have any ideas?
I was able to work up some test code. Again, you must be running
Squeak 3.7 release plus have GOODS.73-avi.mcz loaded with my local
patch to see this problem. See my former email for my patch to store
live morphs in a GOODS db.
Run the following code to see what I am talking about -- I don't get
what is going on with the busted bitmap that appears indistinguisable
from a good one.
*TRY THE FOLLOWING CODE BELOW TO SEE WHAT I MEAN*
"Assumes you have a new GOODs server launched already with the
following parameters"
client _ KKDatabase onHost: 'localhost' port: 9999.
client commitWithRetry: [client root: Dictionary new].
joe _ Morph new.
joe openInWorld.
joe position: joe position + 100.
client commitWithRetry: [client root at: 'joe' put: joe].
joe abandon.
client _ KKDatabase onHost: 'localhost' port: 9999.
(client root at: 'joe') openInWorld. "should see BitBlt error here!"
ActiveWorld restoreMorphicDisplay. "do this to see broken joe --
notice, he's in the right position!"
"remember bad bitmap"
badBitmap _ (client root at: 'joe') color instVarNamed: #cachedBitPattern.
"fix the cachedBitPattern of joe using a new one from Color blue"
(client root at: 'joe') color instVarNamed: #cachedBitPattern put:
(Color blue instVarNamed: #cachedBitPattern).
"let's try to draw joe again -- all is well!"
(client root at: 'joe') resumeAfterDrawError.
ActiveWorld restoreMorphicDisplay. "might need to do this to see fixed joe"
"really weird that the object that is broken is no different than the
object that fixes it??"
badBitmap = ((client root at: 'joe') color instVarNamed: #cachedBitPattern)
- Any thoughts!
John
More information about the Squeak-dev
mailing list
|