Cursor = Focus

Karl Ramberg karl.ramberg at chello.se
Mon Jun 19 11:34:16 UTC 2000



Karl Goiser wrote:
> 
> Hello,
> 
> I'm just starting out on Squeak and cannot help but notice that the
> focus follows the cursor around.  In my opinion, this is a very bad
> thing causing the following problems among others:
> 
> For example, if I select a piece of text for copying and pasting, but
> move the cursor out of the window the text is in before the copy, it
> will not happen - and I will be surprised when I paste something else
> into the new loaction.
> 
> Also, if the mouse goes out of the window I'm typing into, what I
> type will disappear.
> 
> Also, if I have multiple fields for editing, as in BobsUI, the focus
> indication will be very unpredictable from my point of view.
> 
> Is this a 'feature' or a bug?
> 
> Has anybody looked at it and changed it to the way it should work?
> 
> Any suggestions on how to change it?
> 
> Any comments?
> 
This is related to the outBoardScrollBar that I guess Smalltalk GUI has had since
it started. Cursor enters a pane: scroll bar pops up etc. When you use inboard
scroll bars this is not so important anymore and if you are used to other 
GUI's it's hard to get used to in general. This little change set changes the 
behavior and should be used with inboard scroll bars on. Some rough edges though and 
I take no responsibility in case or lost data ;-)

Karl
-------------- next part --------------
'From Squeak2.9alpha of 13 June 2000 [latest update: #2407] on 19 June 2000 at 1:24:41 pm'!

!PluggableListMorph methodsFor: 'events' stamp: 'kfr 6/19/2000 13:17'!
mouseDown: evt
	evt hand newKeyboardFocus: self.
	evt yellowButtonPressed  "First check for option (menu) click"
		ifTrue: [^ self yellowButtonActivity: evt shiftPressed]! !

!PluggableListMorph methodsFor: 'events' stamp: 'kfr 6/19/2000 13:18'!
mouseDown: event onItem: aMorph
	event hand newKeyboardFocus: self.
	event yellowButtonPressed ifTrue: [^ self yellowButtonActivity: event shiftPressed].
	aMorph ifNotNil: [aMorph highlightForMouseDown]! !

!PluggableListMorph methodsFor: 'events' stamp: 'kfr 6/19/2000 13:16'!
mouseEnter: event
	super mouseEnter: event.
	"event hand newKeyboardFocus: self"! !


!PluggableTextMorph methodsFor: 'pane events' stamp: 'kfr 6/19/2000 13:23'!
mouseLeave: event

	textMorph ifNotNil: [selectionInterval _ textMorph editor selectionInterval].
	super mouseLeave: event.
	"event hand newKeyboardFocus: nil."
! !



More information about the Squeak-dev mailing list