'From Squeak3.7alpha of 11 September 2003 [latest update: #5816] on 17 March 2004 at 11:37:58 am'! "Change Set: MagnifierMorphMigration-nk Date: 17 March 2004 Author: Ned Konz My recent extensions to MagnifierMorph didn't deal with old instances, in which the showPointer instVar would be nil. This would lead to Squeak hanging when entering a project containing an old MagnifierMorph, like the 'Fun with Morphic' project in the Worlds of Squeak package. This CS abstracts that variable, and so can deal with old instances. "! !MagnifierMorph methodsFor: 'magnifying' stamp: 'nk 3/17/2004 11:34'! magnifiedForm "Answer the magnified form" | srcRect form exclusion magnified | srcRect := self sourceRectFrom: self sourcePoint. (RecursionLock isNil and: [ self showPointer or: [ srcRect intersects: self bounds ]]) ifTrue: [RecursionLock := self. exclusion := self isRound ifTrue: [owner] ifFalse: [self]. form := self currentWorld patchAt: srcRect without: exclusion andNothingAbove: false. RecursionLock := nil] ifFalse: ["cheaper method if the source is not occluded" form := Display copy: srcRect]. "smooth if non-integer scale" magnified := form magnify: form boundingBox by: magnification smoothing: (magnification isInteger ifTrue: [1] ifFalse: [2]). "display the pointer rectangle if desired" self showPointer ifTrue: [magnified reverse: (magnified center - (2 @ 2) extent: 4 @ 4) fillColor: Color white]. ^ magnified! ! !MagnifierMorph methodsFor: 'menu' stamp: 'nk 3/17/2004 11:34'! showPointer ^showPointer ifNil: [ showPointer _ false ].! ! !MagnifierMorph methodsFor: 'menu' stamp: 'nk 3/17/2004 11:34'! showingPointerString ^ (self showPointer ifTrue: ['stop showing pointer'] ifFalse: ['start showing pointer']) translated! ! !MagnifierMorph methodsFor: 'menu' stamp: 'nk 3/17/2004 11:35'! toggleShowingPointer self showPointer: self showPointer not! !