[BUG][FIX][TEST] Morph adding/removing (v2 - ain't fixed yet)

Joshua 'Schwa' Gargus schwa at cc.gatech.edu
Wed Aug 13 04:57:12 UTC 2003


Two problems I found:

Collapse and expand a BouncingAtomsMorph (make sure that the collapsed
version does not overlap the bounds of the original version).  When
the morph is expanded, it is not redrawn.  It has something to do with
BAM's implementation of #invalidRect:from:.  Ah, got it.  The 'damageReported'
flag is not being set to false when the BAM is expanded.  A solution that 
worked for me is to define BouncingAtomsMorph>>intoWorld: to set the flag.

More troubling is that Morphs that are picked up by the hand are sent
#outOfWorld:, but are not sent #intoWorld: when dropped.  This results in
the original problem that started this whole thread (and possibly others): 
a 3D window is suspended when it is picked up, and acceleration is not
restored when it is dropped.

It sure does pass the tests, though ;-)

Joshua


On Tue, Aug 12, 2003 at 11:45:12PM +0200, Andreas Raab wrote:
> Okay, here's the second version. Like I said there was a slight
> misunderstanding in such that #addedOrRemovedSubmorph: is an invalidation
> message and not a notification. In addition:
> * HandMorph>>dropMorph:event: keeps the owner set itself (which is the same
> behavior as before) but a comment has been added to explain why exactly this
> happens
> * Morph>>slideBackToFormerSituation: has been fixed (referring to the
> event's world which is the Right Way to do it)
> * Morph>>addAllMorphs: and Morph>>addAllMorphs:after: have been folded into
> #privateAddAllMorphs:atIndex: to keep the (needed) complexity in a single
> place.
> 
> As far as I can tell, this should do it. It certainly solves the reported
> problems and still passes the tests ;-)
> 
> Cheers,
>   - Andreas


> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: BouncingAtomsMorph.jcg.1.cs.gz
Type: application/x-gunzip
Size: 261 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030813/6bf264a3/BouncingAtomsMorph.jcg.1.cs.bin


More information about the Squeak-dev mailing list