Use #startApplication: to start monitors.
authorStefan Vogel <sv@exept.de>
Fri, 19 Dec 1997 15:07:39 +0100
changeset 1385 4bca25dd2143
parent 1384 32b40f0c25ba
child 1386 55632b45ced2
Use #startApplication: to start monitors.
Launcher.st
--- a/Launcher.st	Fri Dec 19 13:32:39 1997 +0100
+++ b/Launcher.st	Fri Dec 19 15:07:39 1997 +0100
@@ -3212,12 +3212,29 @@
     "Modified: 13.2.1997 / 16:02:35 / cg"
 !
 
-startEventMonitor
-    "open an eventMonitor view"
-
-    EventMonitor open
-
-    "Modified: 8.1.1997 / 14:55:40 / cg"
+startApplication:aSymbol
+    "start an application,
+     popup warnbox if application is not present or autoload failed"
+
+    |app|
+
+    app := Smalltalk classNamed:aSymbol.
+    app isBehavior ifTrue:[
+        app isLoaded ifFalse:[
+            Autoload autoloadFailedSignal handle:[:ex|
+                ^ self warn:(resources string:'Sorry - cannot load %1' with:app name).
+            ] do:[
+                app autoload.
+            ].
+        ].
+        app open.
+    ] ifFalse:[
+        self warn:(resources string:'Sorry - %1 is only available
+in the full commercial release' with:aSymbol asString).
+    ]
+
+    "Created: / 19.12.1997 / 13:00:29 / stefan"
+    "Modified: / 19.12.1997 / 14:09:46 / stefan"
 !
 
 startFullWindowTreeView
@@ -3237,57 +3254,6 @@
     "Created: 25.7.1997 / 10:56:30 / cg"
 !
 
-startLatencyMonitor
-    "open an interruptLatencyMonitor view"
-
-    InterruptLatencyMonitor notNil ifTrue:[
-	Autoload autoloadFailedSignal catch:[
-	    InterruptLatencyMonitor autoload.
-	].
-	InterruptLatencyMonitor isLoaded ifTrue:[
-	    InterruptLatencyMonitor open.
-	    ^ self.
-	]
-    ].
-    self warn:'Sorry - the irq latency monitor is only available
-in the full commercial release'.
-
-    "Modified: 31.1.1997 / 16:45:54 / cg"
-!
-
-startMemoryMonitor
-    "open a memoryMonitor view"
-
-    MemoryMonitor open
-
-    "Modified: 8.1.1997 / 14:56:14 / cg"
-!
-
-startMemoryUsageView
-    "open a memoryUsage view"
-
-    MemoryUsageView open
-
-    "Modified: 8.1.1997 / 14:56:21 / cg"
-!
-
-startProcessMonitor
-    "open a processMonitor view"
-
-    ProcessMonitor open
-
-    "Modified: 28.7.1997 / 18:56:18 / cg"
-!
-
-startSemaphoreMonitor
-    "open a semaphoreMonitor view"
-
-    SemaphoreMonitor open
-
-    "Modified: 8.1.1997 / 14:56:27 / cg"
-    "Created: 24.1.1997 / 23:48:45 / cg"
-!
-
 startStopEventTrace
     "start/stop event tracing for a particular view"
 
@@ -4152,119 +4118,130 @@
     |m |
 
     myMenu at:#tools 
-	   putLabels:(resources array:#(
-					'workspace'
-					'-'
-					'GUI builder'
-					'-'
-					'monitors'
-					'-'
-					'views'
-					'-'
-					'hardcopy'
-					'-'
-					'misc'
-					))
-	   selectors:#(
-					#startWorkspace 
-					nil
-					#startGUIBuilder 
-					nil
-					#monitors
-					nil
-					#views
-					nil
-					#hardcopy 
-					nil
-					#misc 
-		      )
-	   receiver:self.
+           putLabels:(resources array:#(
+                                        'workspace'
+                                        '-'
+                                        'GUI builder'
+                                        '-'
+                                        'monitors'
+                                        '-'
+                                        'views'
+                                        '-'
+                                        'hardcopy'
+                                        '-'
+                                        'misc'
+                                        ))
+           selectors:#(
+                                        #startWorkspace 
+                                        nil
+                                        #startGUIBuilder 
+                                        nil
+                                        #monitors
+                                        nil
+                                        #views
+                                        nil
+                                        #hardcopy 
+                                        nil
+                                        #misc 
+                      )
+           receiver:self.
 
 
     m := myMenu menuAt:#tools.
     m subMenuAt:#monitors 
       put:(PopUpMenu
-		labels:(resources array:#(
-					   'process'
-					   'semaphores'
-					   'memory'
-					   'irq latency'
-					   'event view'
-					   'event trace'
-					   '-'
-					   'memory usage'
-					 ))
-		selectors:#(
-					#startProcessMonitor
-					#startSemaphoreMonitor 
-					#startMemoryMonitor 
-					#startLatencyMonitor 
-					#startEventMonitor 
-					#startStopEventTrace
-					nil
-					#startMemoryUsageView 
-			   )
-		receiver:self).
+                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).
 
     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).
+                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).
 
     m subMenuAt:#misc 
       put:(PopUpMenu
-		labels:(resources array:#(
-					   'garbage collect'
-					   'garbage collect & compress'
-					 ))
-		selectors:#(
-					#garbageCollect
-					#compressingGarbageCollect
-			   )
-		receiver:self).
+                labels:(resources array:#(
+                                           'garbage collect'
+                                           'garbage collect & compress'
+                                         ))
+                selectors:#(
+                                        #garbageCollect
+                                        #compressingGarbageCollect
+                           )
+                receiver:self).
 
     m subMenuAt:#hardcopy 
       put:(PopUpMenu
-		labels:(resources array:#(
-					   'screen'
-					   'area'
-					   'view'
-					 ))
-		selectors:#(
-					#fullScreenHardcopy
-					#screenHardcopy
-					#viewHardcopy
-			   )
-		receiver:self).
+                labels:(resources array:#(
+                                           'screen'
+                                           'area'
+                                           'view'
+                                         ))
+                selectors:#(
+                                        #fullScreenHardcopy
+                                        #screenHardcopy
+                                        #viewHardcopy
+                           )
+                receiver:self).
 
     "Modified: / 31.10.1997 / 16:01:53 / cg"
+    "Modified: / 19.12.1997 / 13:15:27 / stefan"
 ! !
 
 !Launcher methodsFor:'initialize / release'!
@@ -4974,5 +4951,5 @@
 !Launcher class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.305 1997-12-15 10:38:44 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.306 1997-12-19 14:07:39 stefan Exp $'
 ! !