graph tab - only if all numerical
authorClaus Gittinger <cg@exept.de>
Tue, 22 May 2018 09:34:11 +0200
changeset 18139 4f3c66d0dd31
parent 18138 e374fbbe6c55
child 18140 1e791dffc7c1
graph tab - only if all numerical
extensions.st
--- a/extensions.st	Mon May 21 09:44:22 2018 +0200
+++ b/extensions.st	Tue May 22 09:34:11 2018 +0200
@@ -2303,12 +2303,21 @@
 !SequenceableCollection methodsFor:'inspecting'!
 
 inspector2Tabs
+    "add a graph-tab; but only if all my values are numerical"
+    
     |tabs|
 
     tabs := super inspector2Tabs.
-    self isExternalBytes ifTrue:[^ tabs].
-
-    ^ tabs copyWith:#inspector2TabGraph
+    self isExternalBytes ifFalse:[
+        self isString ifFalse:[
+            self notEmpty ifTrue:[
+                (self conform:#isNumber) ifTrue:[
+                    tabs := tabs copyWith:#inspector2TabGraph
+                ]
+            ]
+        ]
+    ].
+    ^ tabs
 ! !
 
 !Set methodsFor:'misc ui support'!