equal
deleted
inserted
replaced
1 " |
1 " |
2 COPYRIGHT (c) 1993 by Claus Gittinger |
2 COPYRIGHT (c) 1993 by Claus Gittinger |
3 All Rights Reserved |
3 All Rights Reserved |
4 |
4 |
5 This software is furnished under a license and may be used |
5 This software is furnished under a license and may be used |
6 only in accordance with the terms of that license and with the |
6 only in accordance with the terms of that license and with the |
7 inclusion of the above copyright notice. This software may not |
7 inclusion of the above copyright notice. This software may not |
8 be provided or otherwise made available to, or used by, any |
8 be provided or otherwise made available to, or used by, any |
17 category:'Interface-Support' |
17 category:'Interface-Support' |
18 ! |
18 ! |
19 |
19 |
20 KeyboardMap comment:' |
20 KeyboardMap comment:' |
21 COPYRIGHT (c) 1993 by Claus Gittinger |
21 COPYRIGHT (c) 1993 by Claus Gittinger |
22 All Rights Reserved |
22 All Rights Reserved |
23 |
23 |
24 $Header: /cvs/stx/stx/libview/KeyboardMap.st,v 1.4 1994-08-05 01:14:32 claus Exp $ |
24 $Header: /cvs/stx/stx/libview/KeyboardMap.st,v 1.5 1994-10-10 02:32:37 claus Exp $ |
25 '! |
25 '! |
26 |
26 |
27 !KeyboardMap class methodsFor:'documentation'! |
27 !KeyboardMap class methodsFor:'documentation'! |
28 |
28 |
29 copyright |
29 copyright |
30 " |
30 " |
31 COPYRIGHT (c) 1993 by Claus Gittinger |
31 COPYRIGHT (c) 1993 by Claus Gittinger |
32 All Rights Reserved |
32 All Rights Reserved |
33 |
33 |
34 This software is furnished under a license and may be used |
34 This software is furnished under a license and may be used |
35 only in accordance with the terms of that license and with the |
35 only in accordance with the terms of that license and with the |
36 inclusion of the above copyright notice. This software may not |
36 inclusion of the above copyright notice. This software may not |
37 be provided or otherwise made available to, or used by, any |
37 be provided or otherwise made available to, or used by, any |
40 " |
40 " |
41 ! |
41 ! |
42 |
42 |
43 version |
43 version |
44 " |
44 " |
45 $Header: /cvs/stx/stx/libview/KeyboardMap.st,v 1.4 1994-08-05 01:14:32 claus Exp $ |
45 $Header: /cvs/stx/stx/libview/KeyboardMap.st,v 1.5 1994-10-10 02:32:37 claus Exp $ |
46 " |
46 " |
47 ! |
47 ! |
48 |
48 |
49 documentation |
49 documentation |
50 " |
50 " |
65 bindValue:anObject to:key1 followedBy:key2 |
65 bindValue:anObject to:key1 followedBy:key2 |
66 |submap| |
66 |submap| |
67 |
67 |
68 submap := self at:key1. |
68 submap := self at:key1. |
69 submap isNil ifTrue:[ |
69 submap isNil ifTrue:[ |
70 submap := KeyboardMap new. |
70 submap := KeyboardMap new. |
71 self at:key1 put:submap. |
71 self at:key1 put:submap. |
72 ]. |
72 ]. |
73 submap at:key2 put:anObject |
73 submap at:key2 put:anObject |
74 ! |
74 ! |
75 |
75 |
76 valueFor:aKey |
76 valueFor:aKey |
77 |where value| |
77 |where value| |
78 |
78 |
79 where := current notNil ifTrue:[current] ifFalse:[self]. |
79 where := current notNil ifTrue:[current] ifFalse:[self]. |
80 |
80 |
81 value := where at:aKey ifAbsent:[aKey]. |
81 value := where at:aKey ifAbsent:aKey. |
82 (value isMemberOf:KeyboardMap) ifTrue:[ |
82 (value isMemberOf:KeyboardMap) ifTrue:[ |
83 current := value. |
83 current := value. |
84 ^ nil. |
84 ^ nil. |
85 ]. |
85 ]. |
86 current := nil. |
86 current := nil. |
87 ^ value |
87 ^ value |
88 ! ! |
88 ! ! |