[BUG] HandMorph>>newKeyboardFocus

yampa at mindspring.com yampa at mindspring.com
Sun Nov 17 04:57:29 UTC 2002


I am having an intermittent problem with the keyboard focus on some morphs I
wrote. (Squeak 3.2 #4956) Sometimes they do not get sent the
keyboardFocusChange from the hand, even though they should.

  I looked into the HandMorph>>newKeyboardFocus method, and there is a way
this can happen.  I noticed there was an older version of the method, so I
loaded that method, and my morphs now work correctly every time.  

I think the code that causes the problem is here: (12/10/2000 version)

 oldFocus
		ifNotNil: [oldFocus == aMorphOrNil
				ifFalse: [oldFocus keyboardFocusChange: false.
					newKeyboardFocus
						ifNotNil: [newKeyboardFocus keyboardFocusChange: true]]]

----------------------------------------

The working older version looks like this: (10/24/2000 version)

	oldFocus ifNotNil: [oldFocus == aMorphOrNil ifFalse: [oldFocus
keyboardFocusChange: false]].
	aMorphOrNil ifNotNil: [aMorphOrNil keyboardFocusChange: true].

Does anyone know why this was changed, and if it would be a problem to revert
back to the older version?

Thanks

Doug R.




More information about the Squeak-dev mailing list