#FEATURE by exept draft
authorClaus Gittinger <cg@exept.de>
Sun, 20 Oct 2019 08:33:57 +0200
changeset 3794 49da17b54a22
parent 3793 4759769ba7a3
child 3795 0b36f57fd1c9
#FEATURE by exept class: ShowMeHowItWorks changed: #findComponent:in:
ShowMeHowItWorks.st
--- a/ShowMeHowItWorks.st	Sun Oct 20 08:13:53 2019 +0200
+++ b/ShowMeHowItWorks.st	Sun Oct 20 08:33:57 2019 +0200
@@ -1029,6 +1029,14 @@
             ^ self findComponent:restPath in:container
         ]
     ].
+    (componentNameOrPath matchesRegex:'item\[[0-9]+\]') ifTrue:[
+        anApplicationOrViewOrMenuItem isMenu ifFalse:[
+            self assert:false message:'container is not a menu'.
+        ].
+        idx := Integer readFrom:(componentNameOrPath withoutPrefix:'item[') readStream.
+        item := anApplicationOrViewOrMenuItem itemAt:idx.
+        ^ item
+    ].
 
     componentNameSymbol := componentNameOrPath asSymbolIfInterned ? componentNameOrPath.