[BUGFIX] Point>>reciprocal

Trygve Reenskaug trygver at ifi.uio.no
Wed Mar 10 08:51:03 UTC 2004


I have a simple Morph structure:
       SlideRM(BorderedMorph)
          TransformMorphRM(TransformMorph)
              SlideInnerRM(PasteUpMorph)
The Transform scale was aPoint. I got error when computing the inverse 
transform because Point does not understand reciprocal, see attached bug 
report.

A simple fix could be a new method to Point:

    reciprocal
       " Answer a Point with coordinates that are the reciprocals of mine. "
       " Method was missing from release. "
       " 20040301 20:50:35 TRee(Squeak3.6-5429-tree07.38) "

       ^ x reciprocal @ y reciprocal.

--Trygve

-- 

Trygve Reenskaug      mailto: trygver at ifi.uio.no
Morgedalsvn. 5A       http://heim.ifi.uio.no/~trygver
N-0378 Oslo           Tel: (+47) 22 49 57 27
Norway
-------------- next part --------------
MessageNotUnderstood: Point>>reciprocal
9 March 2004 8:38:05 pm

VM: Win32 - Squeak3.6 of '6 October 2003' [latest update: #5424]
Image: Squeak3.6 [latest update: #5429]

Point(Object)>>doesNotUnderstand: #reciprocal
	Receiver: (15/13)@(15/11)
	Arguments and temporary variables: 
		aMessage: 	a Message with selector: #reciprocal and arguments: #()
	Receiver's instance variables: 
		x: 	(15/13)
		y: 	(15/11)

MorphicTransform>>inverseTransformation
	Receiver: a MorphicTransform(angle = 0.0; scale = (15/13)@(15/11); offset = -11 at -210)
	Arguments and temporary variables: 

	Receiver's instance variables: 
		offset: 	-11 at -210
		angle: 	0.0
		scale: 	(15/13)@(15/11)

SlideInnerRM(Morph)>>transferHalo:from:
	Receiver: (1199) : SlideInnerRM
	Arguments and temporary variables: 
		event: 	[212.3333333333333 at 75.5333333333333 mouseDown CMD blue 476931062]
		formerHaloOwner: 	(1199) : SlideInnerRM
		localEvt: 	[212.3333333333333 at 75.5333333333333 mouseDown CMD blue 476931062]
		w: 	(3265) : PasteUpMorph [world]
		target: 	nil
		m: 	(3075) : EllipseMorph
	Receiver's instance variables: 
		bounds: 	10 at 10 corner: 270 at 120
		owner: 	(596) : TransformMorphRM
		submorphs: 	#((3075) : EllipseMorph)
		fullBounds: 	10 at 10 corner: 270 at 120
		color: 	Color lightGreen
		extension: 	a MorphExtension (919) [other:  (dropEnabled -> true) (clipSubmorphs...etc...
		borderWidth: 	1
		borderColor: 	(Color r: 0.861 g: 1.0 b: 0.722)
		presenter: 	nil
		model: 	nil
		cursor: 	1
		padding: 	3
		backgroundMorph: 	nil
		turtleTrailsForm: 	nil
		turtlePen: 	nil
		lastTurtlePositions: 	nil
		isPartsBin: 	nil
		autoLineLayout: 	nil
		indicateCursor: 	nil
		resizeToFit: 	nil
		wantsMouseOverHalos: 	nil
		worldState: 	nil
		griddingOn: 	nil
		slide: 	(3855) : SlideRM

HaloMorph>>transferHalo:
	Receiver: (1254) : HaloMorph
	Arguments and temporary variables: 
		event: 	[256 at 313 mouseDown CMD blue 476931062]
	Receiver's instance variables: 
		bounds: 	22 at 223 corner: 322.0 at 373.0
		owner: 	nil
		submorphs: 	#((3872) : NameStringInHalo'playfield' (3301) : EllipseMorph (1803) ...etc...
		fullBounds: 	2 at 203 corner: 342 at 406
		color: 	(Color r: 0.6 g: 0.8 b: 1.0)
		extension: 	a MorphExtension (1614) [other:  (isMagicHalo -> false)]
		target: 	(1199) : SlideInnerRM
		innerTarget: 	(1199) : SlideInnerRM
		positionOffset: 	233.4615384615385 at 89.3636363636364
		angleOffset: 	nil
		minExtent: 	nil
		growingOrRotating: 	false
		directionArrowAnchor: 	nil
		haloBox: 	10 at 211 corner: 334.0 at 385.0
		simpleMode: 	false


--- The full stack ---
Point(Object)>>doesNotUnderstand: #reciprocal
MorphicTransform>>inverseTransformation
SlideInnerRM(Morph)>>transferHalo:from:
HaloMorph>>transferHalo:
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MouseClickState>>click
MouseClickState>>handleEvent:from:
HandMorph>>handleEvent:
HandMorph>>processEvents
[] in WorldState>>doOneCycleNowFor:
Array(SequenceableCollection)>>do:
WorldState>>handsDo:
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
PasteUpMorph>>doOneCycle
[] in Project class>>spawnNewProcess
[] in BlockContext>>newProcess
-------------- next part --------------



More information about the Squeak-dev mailing list