Object>>currentHand vs. Project class>>returnToPreviousProject

Ned Konz ned at bike-nomad.com
Sat Jul 19 14:38:53 UTC 2003


The comment in Object>>currentHand reads:

"Return a usable HandMorph -- the one associated with the object's 
current environment.  This method will always return a hand, even if 
it has to conjure one up as a last resort.  If a particular hand is 
actually handling events at the moment (such as a remote hand or a 
ghost hand), it will be returned."

However, it no longer does that. Instead it returns ActiveHand, which 
happens to not be set when returning from an MVC project to a Morphic 
project (via Project class>>returnToPreviousProject).

Likewise, "World activeHand" or "self world activeHand" (from the 
point of view of a Morph in the world you're returning to) is nil.

This is mostly no big deal (though I just got bit by it in the 
HandMagnifier), but should we:

(A) fix the comment, or 
(B) fix the behavior to return a new HandMorph if ActiveHand is nil

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE



More information about the Squeak-dev mailing list