dont crash without items
authorClaus Gittinger <cg@exept.de>
Sat, 23 Mar 1996 17:21:25 +0100
changeset 516 656a8f993435
parent 515 2ae02365d238
child 517 fc4ed55dcd35
dont crash without items
PullDMenu.st
PullDownMenu.st
--- a/PullDMenu.st	Fri Mar 22 16:50:10 1996 +0100
+++ b/PullDMenu.st	Sat Mar 23 17:21:25 1996 +0100
@@ -1236,14 +1236,18 @@
     "adjust origins of menus when font changes"
 
     (font device == device) ifTrue:[
-	menus keysAndValuesDo:[:index :aMenu |
-	    aMenu notNil ifTrue:[
-		aMenu origin:((left + (self titleLenUpTo:index)) 
-			      @
-			      (height + aMenu borderWidth))
-	    ].
-	]
+        menus notNil ifTrue:[
+            menus keysAndValuesDo:[:index :aMenu |
+                aMenu notNil ifTrue:[
+                    aMenu origin:((left + (self titleLenUpTo:index)) 
+                                  @
+                                  (height + aMenu borderWidth))
+                ].
+            ]
+        ]
     ]
+
+    "Modified: 23.3.1996 / 17:18:36 / cg"
 !
 
 someMenuItemLabeled:aLabel
@@ -1381,5 +1385,5 @@
 !PullDownMenu class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Attic/PullDMenu.st,v 1.42 1996-03-22 14:38:51 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Attic/PullDMenu.st,v 1.43 1996-03-23 16:21:25 cg Exp $'
 ! !
--- a/PullDownMenu.st	Fri Mar 22 16:50:10 1996 +0100
+++ b/PullDownMenu.st	Sat Mar 23 17:21:25 1996 +0100
@@ -1236,14 +1236,18 @@
     "adjust origins of menus when font changes"
 
     (font device == device) ifTrue:[
-	menus keysAndValuesDo:[:index :aMenu |
-	    aMenu notNil ifTrue:[
-		aMenu origin:((left + (self titleLenUpTo:index)) 
-			      @
-			      (height + aMenu borderWidth))
-	    ].
-	]
+        menus notNil ifTrue:[
+            menus keysAndValuesDo:[:index :aMenu |
+                aMenu notNil ifTrue:[
+                    aMenu origin:((left + (self titleLenUpTo:index)) 
+                                  @
+                                  (height + aMenu borderWidth))
+                ].
+            ]
+        ]
     ]
+
+    "Modified: 23.3.1996 / 17:18:36 / cg"
 !
 
 someMenuItemLabeled:aLabel
@@ -1381,5 +1385,5 @@
 !PullDownMenu class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/PullDownMenu.st,v 1.42 1996-03-22 14:38:51 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/PullDownMenu.st,v 1.43 1996-03-23 16:21:25 cg Exp $'
 ! !