--- a/EnterFieldGroup.st Fri May 31 21:38:55 1996 +0200
+++ b/EnterFieldGroup.st Fri May 31 21:39:25 1996 +0200
@@ -591,7 +591,7 @@
!EnterFieldGroup methodsFor:'group control'!
fieldLeft:aField index:thisIndex withKey:key
- |action next wg explicit nFields nextField|
+ |action next wg explicit nFields nextField fs|
"/ currentField notNil ifTrue:[
"/ currentField disable.
@@ -601,6 +601,27 @@
action := key.
nFields := fields size.
+ "/ if there is a windowGroup, which has a focusSequence,
+ "/ and the group is left, let it control who is going to get the
+ "/ focus. Otherwise, stay within the group.
+
+ ((wg := aField windowGroup) notNil
+ and:[(fs := wg focusSequence) notNil
+ and:[fs includesIdentical:aField]]) ifTrue:[
+ ((key == #CursorUp) or:[key == #PreviousField]) ifTrue:[
+ (thisIndex == 1) ifTrue:[
+ ^ wg focusPrevious
+ ].
+ ].
+ ((key == #CursorDown)
+ or:[key == #NextField
+ or:[key == #Tab]]) ifTrue:[
+ (thisIndex == nFields) ifTrue:[
+ ^ wg focusNext
+ ].
+ ].
+ ].
+
((key == #CursorUp) or:[key == #PreviousField]) ifTrue:[
(thisIndex == 1) ifTrue:[
next := nFields
@@ -652,7 +673,7 @@
]
"Created: 21.5.1996 / 21:18:08 / cg"
- "Modified: 21.5.1996 / 21:21:56 / cg"
+ "Modified: 31.5.1996 / 21:35:31 / cg"
! !
!EnterFieldGroup methodsFor:'misc'!
@@ -721,5 +742,5 @@
!EnterFieldGroup class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/EnterFieldGroup.st,v 1.26 1996-05-22 17:04:18 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/EnterFieldGroup.st,v 1.27 1996-05-31 19:39:25 cg Exp $'
! !