[FIX] world installation (was "[BUG] New projects need kickstarting")

Craig Latta Craig.Latta at NetJam.ORG
Tue Nov 6 07:00:29 UTC 2001


Hello again--

> [No world menus come up when entering a newly-created Morphic project with flaps and the project navigator disabled.]

	Well, it seems that the problem is (the new world)<<fullBounds not
getting set correctly, so all mouse-down events are rejected in
MorphicEventDispatcher>>dispatchMouseDown:with: ("(aMorph fullBounds
containsPoint: globalPt) ifFalse:[^#rejected]"). After that point,
submorphs are given a chance to handle events, but there aren't any
submorphs in this situation.

	One fix is to set <<fullBounds when setting <<bounds in
PasteUpMorph>>viewBox: (which is run by PasteUpMorph>>install when
entering a new Morphic project). The attached does this.


	thanks,

-C

--
Craig Latta
composer and computer scientist
craig.latta at netjam.org
www.netjam.org
crl at watson.ibm.com
Smalltalkers do: [:it | All with: Class, (And love: it)]
-------------- next part --------------
'From Squeak3.2alpha of 26 October 2001 [latest update: #4469] on 5 November 2001 at 10:58:29 pm'!

!PasteUpMorph methodsFor: 'project state' stamp: 'crl 11/5/2001 22:57'!
viewBox: newViewBox
	"I am now displayed within newViewBox; react."

	(self viewBox == nil or: [self viewBox extent ~= newViewBox extent]) ifTrue: [worldState canvas: nil].

	worldState viewBox: newViewBox.
	super position: newViewBox topLeft.
	fullBounds _ bounds _ newViewBox.

	"Paragraph problem workaround; clear selections to avoid screen droppings."
	self flag: #arNote.		"Probably unnecessary"
	worldState handsDo: [:hand | hand releaseKeyboardFocus].
	self fullRepaintNeeded! !


More information about the Squeak-dev mailing list