# HG changeset patch # User Claus Gittinger # Date 1563548140 -7200 # Node ID fa10e87dbf04336111a24a8295103a7d44f07783 # Parent 688f4186d4f263e168ffec80db7b010293b7f74a #DOCUMENTATION by cg class: ShowMeHowItWorks class definition added: #application: changed: #findComponent: class: ShowMeHowItWorks class comment/format in: #documentation changed: #doStream: #example diff -r 688f4186d4f2 -r fa10e87dbf04 ShowMeHowItWorks.st --- a/ShowMeHowItWorks.st Fri Jul 19 16:53:23 2019 +0200 +++ b/ShowMeHowItWorks.st Fri Jul 19 16:55:40 2019 +0200 @@ -5,7 +5,7 @@ "{ NameSpace: Smalltalk }" Object subclass:#ShowMeHowItWorks - instanceVariableNames:'opStream lastComponentName lastComponent lastResult' + instanceVariableNames:'application opStream lastComponentName lastComponent lastResult' classVariableNames:'' poolDictionaries:'' category:'Interface-Help' @@ -15,39 +15,19 @@ documentation " - documentation to be added. - - class: - - - responsibilities: - - - collaborators: - - - API: - - - example: - - - implementation: - + automatic presentations. + To see how it works, open a methodFinder: + MethodFinderWindow open + and select its 'Show me how it works' item in the help menu. [author:] Claus Gittinger - - [instance variables:] - - [class variables:] - - [see also:] - " ! example + MethodFinderWindow open. + ShowMeHowItWorks do:#( ( showing: 'Choose the number of arguments' do:( moveTo: NumberOfArguments @@ -84,13 +64,25 @@ "must run as a separate process; otherwise - if started by the app itself - no events will be processed while running" - + + |appWhichStartedMe| + + appWhichStartedMe := WindowGroup activeMainApplication. + [ - self new doStream:specStream + self new + application:appWhichStartedMe; + doStream:specStream ] fork. "Created: / 19-07-2019 / 10:53:07 / Claus Gittinger" - "Modified (comment): / 19-07-2019 / 14:30:29 / Claus Gittinger" + "Modified: / 19-07-2019 / 16:44:02 / Claus Gittinger" +! ! + +!ShowMeHowItWorks methodsFor:'accessing'! + +application:something + application := something. ! ! !ShowMeHowItWorks methodsFor:'commands'! @@ -440,11 +432,10 @@ findComponent:componentName "find a component by name - in the active and possibly in any app" - |app component candidates| + |component candidates| - app := WindowGroup activeMainApplication. - app notNil ifTrue:[ - component := self findComponent:componentName in:app. + application notNil ifTrue:[ + component := self findComponent:componentName in:application. ]. component isNil ifTrue:[ @@ -472,6 +463,7 @@ ^ component "Created: / 19-07-2019 / 12:02:30 / Claus Gittinger" + "Modified: / 19-07-2019 / 16:44:30 / Claus Gittinger" ! findComponent:componentName in:anApplication