[FIX][More BUGS] Thumbnails in Flaps

Bert Freudenberg bert at isgnw.CS.Uni-Magdeburg.De
Wed Mar 31 12:18:13 UTC 1999


[FIXES] Firstly, there were recursive thumbnails when dropping a thumbnail
into a flap smaller than the thumbnail. Secondly, with the "tools" flap
staying opened, other Morphs showed names ending in digits. 

[BUG] When tracking these bugs down (and thus trying to understand
Morph's naming protocol - grrrr) I got one ugly "hangup". It's
reproducable by these steps:
	1. Save your image (!)
	2. Go to the "tools" flap
	3. Get a halo for a thumbnail
	4. Clone it via the green handle
	5. Drop it somewhere

[IDEA] I'd like to have an "Emergency Evaluator" (Andreas once had one,
but I couldn't find it ...)

[Q] Is it okay to remove these unsent messages?
	Morph>>#thumbnailOfHeight:
	Morph>>#newThumbnailOfHeight: 
	HandMorph>>#makeAliasForArgument

/bert

-- 
 Bert Freudenberg                                       Departement of 
                                                        Simulation and
 mailto:bert at isg.cs.uni-magdeburg.de                    Computer Graphics
 http://isgwww.cs.uni-magdeburg.de/isg/bert.html        Univ. of Magdeburg



Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="twoThumbnailFixes-bf.cs"
Content-ID: <Pine.LNX.3.96.990331140241.1993E at balloon.cs.uni-magdeburg.de>
Content-Description: 

'From Squeak 2.3 of January 14, 1999 on 31 March 1999 at 12:47:04 pm'!
"Change Set:		twoThumbnailFixes-bf
Date:			31 March 1999
Author:			Bert Freudenberg

Fixes two bugs: Firstly, there were recursive thumbnails (that is, thumbnails inside of thumbnails) when dropping a thumbnail into a flap smaller than the thumbnail. Secondly, with flaps open, Morphs showed 'innocuous' names ending in digits because thumbnails had 'known' names from their representees. The postscriptum nils all names in existing thumbnails (new thumbnails shouldn't get one)."!


!MorphThumbnail methodsFor: 'all' stamp: 'bf 3/31/1999 12:24'!
innocuousName
	^ morphRepresented isNil
		ifTrue: [super innocuousName]
		ifFalse: [morphRepresented innocuousName]! !

!MorphThumbnail methodsFor: 'all' stamp: 'bf 3/31/1999 12:38'!
morphRepresented: aMorph

	morphRepresented _ aMorph.
	self computeThumbnail.
! !

!MorphThumbnail methodsFor: 'all' stamp: 'bf 3/31/1999 07:54'!
representativeNoTallerThan: maxHeight norWiderThan: maxWidth thumbnailHeight: thumbnailHeight

	"Return a morph representing the receiver but which is no taller than aHeight.  If the receiver is already small enough, just return it, else return a MorphThumbnail companioned to the receiver, enforcing the maxWidth"

	(self height <= maxHeight and: [self width <= maxWidth]) ifTrue: [^ self].

	^ MorphThumbnail new
		extent: maxWidth @ (thumbnailHeight min: self height);
		morphRepresented: morphRepresented! !


"Postscript:
Nil out all existing external names in MorphThumbnails."
MorphThumbnail allInstances do:
	[:m | m extension ifNotNil: [m extension externalName: nil]] 
!





More information about the Squeak-dev mailing list