[BUG] Reading FlashCharacterMorphs (was: Re: [Newbie]Trying to save/restore SqueakLogo)

Bert Freudenberg bert at isg.cs.uni-magdeburg.de
Mon Apr 15 10:07:38 UTC 2002

On Sun, 14 Apr 2002, Jean Berger wrote:

> Wanted to get rid of the "moving eyes" SqueakLogo thingy, but wanted to be 
> able to get it back again someday, maybe.
> Finally tried the following, with poor results. Tried to browse around, 
> inspect, explore, etc. but after scratching head for hours and risking 
> blindness, decided to pester the list to see if I'm hopelessly insane or 
> stupid, or whether there's a "bug" (nah, couldn't be) keeping me from my 
> goal.

Looks like a bug to me. Hence the repost.

> Tried saving the existing SqueakLogo FlashCharacterMorph as follows:
> SqueakLogo -> cmd-click -> halos -> menu -> debug... -> save morph in file
> (saved to "my FlashCharacterMorph.morph")
> Tried to load it back in (presumably as another copy) like this:
> World -> new morph... -> from a file...
> (selected "my FlashCharacterMorph.morph")
> Got this nice "error window" to which I responded "Abandon."
> MessageNotUnderstood: restoreEndianness

This method is missing. Seemingly nobody ever tried what you wanted to do ;-)

It should probably look like:

	Smalltalk endianness == #little 
		ifTrue: [Smalltalk swapBytesIn: self from: 1 to: self basicSize]

which solves the messageNotUnderstood loading error. But even then the
morph does not get drawn correctly. The primitive fails in 

BalloonEngine>>primAddCompressedShape: points segments: nSegments 
leftFills: leftFills rightFills: rightFills lineWidths: lineWidths 
lineFills: lineFills fillIndexList: fillIndexList

with the values

points: 	a ShortPointArray(4808 at 5063 4689 at 4609 4712 at 4171 4712 at 4171 
		4735 at 3738 4904 at 3207)
nSegments: 	2
leftFills: 	ShortRunArray (  (0 512) )
rightFills: 	ShortRunArray (  (0 512) )
lineWidths: 	ShortRunArray (  (40 2) )
lineFills: 	ShortRunArray (  (1 2) )
fillIndexList: 	a WordArray(4278190081)

which looks okay to me ...

-- Bert

More information about the Squeak-dev mailing list