[UPDATES] 2.7alpha news, testers wanted

Bob Arning arning at charm.net
Sat Nov 27 16:11:23 UTC 1999


On Sat, 27 Nov 1999 15:43:42 +0100 (MET) Bert Freudenberg <bert at isgnw.CS.Uni-Magdeburg.De> wrote:
>I only played with it a little bit, but the world menu of inner worlds
>behaves strangely. For example, a "restore display" seems to set the
>display bounds to the inner world, so after this part of the outer world
>aren't updated anymore. Or, choosing "set desktop color" brings up the
>color palette at the upper left corner of the outer world, so if the inner
>world window doesn't cover that part of the screen, it's invisible.  Or,
>choosing "previous project" from the inner world and reentering the
>project does restore the inner world as outer world - if you have
>something important in the outer world, you should save your image before
>trying that. 

Here are fixes for the first two. The third I'm not sure about. The inner world isn't a "project" world. It could either punt these messages to the outermost world or not offer the choices at all.

Cheers,
Bob

===========
'From Squeak2.7alpha of 9 November 1999 [latest update: #1656] on 27 November 1999 at 11:09:34 am'!
PasteUpMorph subclass: #WiWPasteUpMorph
	instanceVariableNames: 'parentWorld hostWindow pendingEvent displayDepthOnEntry displayExtentOnEntry '
	classVariableNames: 'Debug '
	poolDictionaries: ''
	category: 'Morphic-WiW'!

!ColorPickerMorph methodsFor: 'other' stamp: 'RAA 11/27/1999 10:08'!
bestPositionNear: box inWorld: world
	| points b |
	points _ #(topCenter rightCenter bottomCenter leftCenter).  "possible anchors"
	1 to: 4 do:
		[:i |  "Try the four obvious anchor points"
		b _ self bounds align: (self bounds perform: (points at: i))
					with: (box perform: (points atWrap: i + 2)).
		(world bounds containsRect: b) ifTrue:
			[^ b topLeft"  Yes, it fits"]].

	^ world bounds origin + (20 at 20)  "when all else fails"
! !


!DisplayScreen methodsFor: 'private' stamp: 'RAA 11/27/1999 11:09'!
setExtent: aPoint depth: bitsPerPixel  "DisplayScreen startUp"
	"This method is critical.  If the setExtent fails, there will be no
	proper display on which to show the error condition..."
	"ar 5/1/1999: ... and that is exactly why we check for the available display depths first."

	(depth == bitsPerPixel and: [aPoint = self extent and: 
					[self supportsDisplayDepth: bitsPerPixel]]) ifFalse: [
		bits _ nil.  "Free up old bitmap in case space is low"
		(self supportsDisplayDepth: bitsPerPixel)
			ifTrue:[super setExtent: aPoint depth: bitsPerPixel]
			ifFalse:["Search for a suitable depth"
					super setExtent: aPoint depth: self findAnyDisplayDepth].
	].
	clippingBox _ super boundingBox! !


!WiWPasteUpMorph methodsFor: 'activation' stamp: 'RAA 11/27/1999 11:02'!
becomeTheActiveWorldWith: evt
	| outerWorld |
	World == self ifTrue: [^ self].
	self damageRecorder reset.	"since we may have moved, old data no longer valid"
	hostWindow setStripeColorsFrom: Color green.
	self canvas: nil.	"safer to start from scratch"
	displayDepthOnEntry _ Display depth.
	displayExtentOnEntry _ Display extent.

	"Messy stuff to clear flaps from outer world"
	Utilities globalFlapTabs do: [:f | f changed].
	outerWorld _ World.
	World _ self.
		self installFlaps.
	World _ outerWorld.
		outerWorld displayWorld.
	World _ self.

	self viewBox: hostWindow panelRect.
	self startSteppingSubmorphsOf: self.
	self changed.
	pendingEvent _ nil.
	evt ifNotNil: [self primaryHand handleEvent: (evt setHand: self primaryHand)].

! !

!WiWPasteUpMorph methodsFor: 'activation' stamp: 'RAA 11/27/1999 11:07'!
revertToParentWorldWithEvent: evt

	self damageRecorder reset.	"Terminate local display"
	World _ parentWorld.
	World assuredCanvas.
	World installFlaps.
	hostWindow setStripeColorsFrom: Color red.
	(displayDepthOnEntry = Display depth and: [displayExtentOnEntry = Display extent]) ifFalse: [
		World fullRepaintNeeded
	].

	evt ifNotNil: [World restartWorldCycleWithEvent: evt].

! !

!WiWPasteUpMorph methodsFor: 'drawing' stamp: 'RAA 11/27/1999 11:08'!
restoreDisplay

	self == World ifTrue:  "Else we're a morphic world-window in an mvc worldState and the restoreDisplay was, unusually, issued from the world's menu rather than from the mvc screen menu"
		[DisplayScreen startUp.
		self handsDo: [:h | h endDisplaySuppression].
		self restoreFlapsDisplay].
	self fullRepaintNeeded! !





More information about the Squeak-dev mailing list