use new popupmenu creation messages
authorClaus Gittinger <cg@exept.de>
Sat, 25 Jul 1998 12:05:54 +0200
changeset 1744 1099dc1d6ea1
parent 1743 88f86bfde4a4
child 1745 337a8b80e297
use new popupmenu creation messages
Launcher.st
--- a/Launcher.st	Thu Jul 23 23:33:16 1998 +0200
+++ b/Launcher.st	Sat Jul 25 12:05:54 1998 +0200
@@ -1975,142 +1975,83 @@
     m := myMenu menuAt:#demos.
     m subMenuAt:#games
       put:(PopUpMenu
-                labels:(resources array:#(
-                                           'Tetris'
-                                           'Tic Tac Toe'
-                                           'Tic Tac Toe (2 players)'
-                                         ))
-                selectors:#(
-                                           startTetris
-                                           startTicTacToe
-                                           startTicTacToe2
-                           )
-                receiver:self).
+                itemList:#(
+                           ('Tetris'                  startTetris     )
+                           ('Tic Tac Toe'             startTicTacToe  )
+                           ('Tic Tac Toe (2 players)' startTicTacToe2 )
+                          )
+                resources:resources).
 
     "
      and labels:selector:args:receiver: here:
     "
     m subMenuAt:#geometricDesigns
       put:(PopUpMenu
-                labels:(resources array:#(
-                                           'Pen demo'
-                                           'Commander demo'
-                                           '-'     
-                                           'Mandelbrot demo'
-                                           'Fractal plants demo'
-                                           'Fractal patterns demo'
-                                           'more fractal patterns demo'
-                                         ))
-                selector:#openDemo:
-                args:#(
-                                           PenDemo
-                                           CommanderDemo
-                                           nil
-                                           ComplexIterationView
-                                           FractalPlantsDemo
-                                           FractalPatternsDemo
-                                           ArmchairUniverseDemo
-                      )
-                receiver:self).
+                itemList:#(
+                           ('Pen demo'                   #openDemo:  nil PenDemo              )
+                           ('Commander demo'             #openDemo:  nil CommanderDemo        )
+                           ('-'                                                               )
+                           ('Mandelbrot demo'            #openDemo:  nil ComplexIterationView )
+                           ('Fractal plants demo'        #openDemo:  nil FractalPlantsDemo    )
+                           ('Fractal patterns demo'      #openDemo:  nil FractalPatternsDemo  )
+                           ('more fractal patterns demo' #openDemo:  nil ArmchairUniverseDemo )
+                          )
+                resources:resources).
 
     m subMenuAt:#simpleAnimations 
       put:(PopUpMenu
-                labels:(resources array:#(
-                                           'Animation'
-                                           'Globe demo'
-                                         ))
-                selector:#openDemo:
-                args:#(
-                                           Animation
-                                           GlobeDemo
-                      )
-                receiver:self).
+                itemList:#(
+                           ('Animation'     #openDemo nil Animation )
+                           ('Globe demo'    #openDemo nil GlobeDemo )
+                         )
+                resources:resources).
 
     m subMenuAt:#'3Dgraphics' 
       put:(PopUpMenu
-                labels:(resources 
-                            array:#(
-                                'plane'
-                                'tetra'
-                                'cube (wireframe)'
-                                'cube (solid)'
-                                'sphere (wireframe)'
-                                'doughnut (wireframe)'
-                                'planet'
-                                'teapot'
-                                'logo'
-                                'rubics cube'
-                                'x/y graph'
-                                'x/y graph widget'
-                                'x/y graph animated'
-                                '-'
-                                'cube (light)'
-                                'cube (light & texture)'
-                                'sphere (light)'
-                                'colored octahedron'
-                             ))
-                selector:#openDemo:
-                args:#(
-                                GLPlaneDemoView2
-                                GLTetraDemoView
-                                GLWireCubeDemoView
-                                GLCubeDemoView
-                                GLWireSphereDemoView
-                                GLDoughnutDemoView
-                                GLPlanetDemoView
-                                GLTeapotDemo
-                                Logo3DView1
-                                RubicsCubeView
-                                GLXYGraph
-                                #'CodingExamples_GUI::GLXYGraph3DDemo'
-                                #'CodingExamples_GUI::AnimatedGLXYGraph3DDemo'
-                                nil
-                                GLCubeDemoView2
-                                GLBrickCubeDemoView
-                                GLSphereDemoView2
-                                GLOctaHedronDemoView
-                      )
-                receiver:self).
+                itemList:#( 
+                            ('plane'                  #openDemo:  nil  GLPlaneDemoView2      )
+                            ('tetra'                  #openDemo:  nil  GLTetraDemoView       )
+                            ('cube (wireframe)'       #openDemo:  nil  GLWireCubeDemoView    )
+                            ('cube (solid)'           #openDemo:  nil  GLCubeDemoView        )
+                            ('sphere (wireframe)'     #openDemo:  nil  GLWireSphereDemoView  )
+                            ('doughnut (wireframe)'   #openDemo:  nil  GLDoughnutDemoView    )
+                            ('planet'                 #openDemo:  nil  GLPlanetDemoView      )
+                            ('teapot'                 #openDemo:  nil  GLTeapotDemo          )
+                            ('logo'                   #openDemo:  nil  Logo3DView1           )
+                            ('rubics cube'            #openDemo:  nil  RubicsCubeView        )
+                            ('x/y graph'              #openDemo:  nil  GLXYGraph             )
+                            ('x/y graph widget'       #openDemo:  nil  #'CodingExamples_GUI::GLXYGraph3DDemo'        )
+                            ('x/y graph animated'     #openDemo:  nil  #'CodingExamples_GUI::AnimatedGLXYGraph3DDemo')
+                            ('-'                                                             )
+                            ('cube (light)'           #openDemo:  nil  GLCubeDemoView2       )
+                            ('cube (light & texture)' #openDemo:  nil  GLBrickCubeDemoView   )
+                            ('sphere (light)'         #openDemo:  nil  GLSphereDemoView2     )
+                            ('colored octahedron'     #openDemo:  nil  GLOctaHedronDemoView  )
+                          )
+                resources:resources).
 
     m subMenuAt:#graphicEditors 
       put:(PopUpMenu
-                labels:(resources array:#(
-                                           'DrawTool'
-                                           'LogicTool'
-                                           'Paint Demo'
-                                         ))
-                selector:#openDemo:
-                args:#(
-                                           DrawTool
-                                           LogicTool
-                                           ColorDrawDemo3
-                      )
-                receiver:self).
+                itemList:#(
+                           ('DrawTool'   #openDemo:  nil  DrawTool       )
+                           ('LogicTool'  #openDemo:  nil  LogicTool      )
+                           ('Paint Demo' #openDemo:  nil  ColorDrawDemo3 )
+                          )
+                resources:resources).
 
     m subMenuAt:#goodies 
       put:(PopUpMenu
-                labels:(resources array:#(
-                                        'clock'
-                                        'digital clock'
-                                        'calendar'
-                                        'calculator'
-                                        '-'
-                                        'mail tool'
-                                        'news tool'
-                                        'ftp tool'
-                                        ))
-                selector:#openDemo:
-                args:#(
-                                        Clock 
-                                        DigitalClockView 
-                                        Calendar
-                                        CalculatorView
-                                        nil
-                                        MailView 
-                                        NewsView
-                                        FTPTool
-                      )
-                receiver:self).
+                itemList:#(
+                            ('clock'          #openDemo:  nil  Clock            )
+                            ('digital clock'  #openDemo:  nil  DigitalClockView )
+                            ('calendar'       #openDemo:  nil  Calendar         )
+                            ('calculator'     #openDemo:  nil  CalculatorView   )
+                            ('-'                                                )
+                            ('mail tool'      #openDemo:  nil  MailView         )
+                            ('news tool'      #openDemo:  nil  NewsView         )
+                            ('ftp tool'       #openDemo:  nil  FTPTool          )
+                           )
+                resources:resources).
 
     "Modified: / 9.7.1998 / 22:27:10 / cg"
 !
@@ -2416,95 +2357,52 @@
     m := myMenu menuAt:#tools.
     m subMenuAt:#monitors 
       put:(PopUpMenu
-                labels:(resources array:#(
-                                           'process'
-                                           'semaphores'
-                                           'memory'
-                                           'irq latency'
-                                           'event view'
-                                           'event trace'
-                                           '-'
-                                           'memory usage'
-                                         ))
-                selectors:#(
-                                        #startApplication:
-                                        #startApplication:
-                                        #startApplication:
-                                        #startApplication:
-                                        #startApplication:
-                                        #startStopEventTrace
-                                        nil
-                                        #startApplication:
-                           )
-                args:#(
-                                        #ProcessMonitor
-                                        #SemaphoreMonitor
-                                        #MemoryMonitor
-                                        #InterruptLatencyMonitor
-                                        #EventMonitor 
-                                        #StopEventTrace
-                                        nil
-                                        #MemoryUsageView
-                       )
-                receiver:self).
+                itemList:#(
+                           ('process'      #startApplication:  nil  #ProcessMonitor          )
+                           ('semaphores'   #startApplication:  nil  #SemaphoreMonitor        )
+                           ('memory'       #startApplication:  nil  #MemoryMonitor           )
+                           ('irq latency'  #startApplication:  nil  #InterruptLatencyMonitor )
+                           ('event view'   #startApplication:  nil  #EventMonitor            )
+                           ('event trace'  #startApplication:  nil  #StopEventTrace          )
+                           ('-'                                                              )
+                           ('memory usage' #startApplication:  nil  #MemoryUsageView         )
+                          )
+                resources:resources).
 
     m subMenuAt:#views 
       put:(PopUpMenu
-                labels:(resources array:#(
-                                           'iconify all'
-                                           'de-iconify all'
-                                           '-'
-                                           'find & raise ...'
-                                           '-'
-                                           'view tree (all views)'
-                                           'view tree'
-                                           '-'
-                                           'select & inspect view'
-                                           '-'
-                                           'select & destroy view'
-                                           'find & destroy ...'
-                                         ))
-                selectors:#(
-                                        #iconifyAllWindows
-                                        #deIconifyAllWindows
-                                        nil
-                                        #findAndRaiseWindow 
-                                        nil
-                                        #startFullWindowTreeView 
-                                        #startWindowTreeView 
-                                        nil
-                                        #viewInspect 
-                                        nil
-                                        #viewDestroy 
-                                        #findAndDestroyWindow 
-                           )
-                receiver:self).
+                itemList:#(
+                           ('iconify all'           #iconifyAllWindows        )
+                           ('de-iconify all'        #deIconifyAllWindows      )
+                           ('-'                                               )
+                           ('find & raise ...'      #findAndRaiseWindow       )
+                           ('-'                                               )
+                           ('view tree (all views)' #startFullWindowTreeView  )
+                           ('view tree'             #startWindowTreeView      )
+                           ('-'                                               )
+                           ('select & inspect view' #viewInspect              )
+                           ('-'                                               )
+                           ('select & destroy view' #viewDestroy              )
+                           ('find & destroy ...'    #findAndDestroyWindow     )
+                          )
+                resources:resources).
 
     m subMenuAt:#misc 
       put:(PopUpMenu
-                labels:(resources array:#(
-                                           'garbage collect'
-                                           'garbage collect & compress'
-                                         ))
-                selectors:#(
-                                        #garbageCollect
-                                        #compressingGarbageCollect
-                           )
-                receiver:self).
+                itemList:#(
+                           ('garbage collect'            #garbageCollect            )
+                           ('garbage collect & compress' #compressingGarbageCollect )
+                          )
+                resources:resources).
 
     m subMenuAt:#hardcopy 
       put:(PopUpMenu
-                labels:(resources array:#(
-                                           'screen'
-                                           'area'
-                                           'view'
-                                         ))
-                selectors:#(
-                                        #fullScreenHardcopy
-                                        #screenHardcopy
-                                        #viewHardcopy
-                           )
-                receiver:self).
+                itemList:#(
+                           ('screen' #fullScreenHardcopy )
+                           ('area'   #screenHardcopy     )
+                           ('view'   #viewHardcopy       )
+                          )
+                resources:resources).
 
     "Modified: / 31.10.1997 / 16:01:53 / cg"
     "Modified: / 19.12.1997 / 13:15:27 / stefan"
@@ -5559,5 +5457,5 @@
 !Launcher class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.355 1998-07-21 09:40:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.356 1998-07-25 10:05:54 cg Exp $'
 ! !