MenuView.st
changeset 569 8c460366645e
parent 543 a18d346f1585
child 586 032b3245e53a
--- a/MenuView.st	Mon Apr 22 11:44:32 1996 +0200
+++ b/MenuView.st	Mon Apr 22 11:45:32 1996 +0200
@@ -848,14 +848,18 @@
 !
 
 checkToggleAt:indexOrName
-    "return a check-toggles boolean state"
+    "return a check-toggles boolean state.
+     If the item is not a check-item, return nil."
 
     |index|
 
     index := self indexOf:indexOrName.
-    index == 0 ifTrue:[^ false].
-    onOffFlags isNil ifTrue:[^ false].
+    index == 0 ifTrue:[^ nil].
+    onOffFlags isNil ifTrue:[^ nil].
+    index > onOffFlags size ifTrue:[^ nil].
     ^ onOffFlags at:index
+
+    "Modified: 22.4.1996 / 10:51:54 / cg"
 !
 
 checkToggleAt:indexOrName put:aBoolean
@@ -2427,5 +2431,5 @@
 !MenuView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.69 1996-04-17 20:21:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.70 1996-04-22 09:45:32 cg Exp $'
 ! !