handle nil labels
authorca
Tue, 25 Feb 1997 14:32:45 +0100
changeset 1048 ba7bdd999f40
parent 1047 4d7bc9784f94
child 1049 24360c8891d6
handle nil labels
MenuView.st
--- a/MenuView.st	Tue Feb 25 14:32:01 1997 +0100
+++ b/MenuView.st	Tue Feb 25 14:32:45 1997 +0100
@@ -1014,10 +1014,13 @@
     nItems := list size.
     enableFlags := Array new:nItems withAll:true.
     onOffFlags := Array new:nItems.
-    text keysAndValuesDo:[:index :line |
-        (line notNil
-        and:[line string includes:$\ ]) ifTrue:[
-            onOffFlags at:index put:false
+
+    text notNil ifTrue:[
+        text keysAndValuesDo:[:index :line |
+            (line notNil
+            and:[line string includes:$\ ]) ifTrue:[
+                onOffFlags at:index put:false
+            ].
         ].
     ].
     shown ifTrue:[
@@ -2617,5 +2620,5 @@
 !MenuView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.100 1997-02-21 19:15:28 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/MenuView.st,v 1.101 1997-02-25 13:32:45 ca Exp $'
 ! !