ApplicationModel.st
changeset 4316 a0550c30453e
parent 4315 1a0e7c9e4f80
child 4317 f0048471e0cf
--- a/ApplicationModel.st	Mon Jul 22 17:10:02 2019 +0200
+++ b/ApplicationModel.st	Mon Jul 22 17:35:55 2019 +0200
@@ -2845,6 +2845,115 @@
     "Modified: / 31.7.1998 / 17:55:31 / cg"
 ! !
 
+!ApplicationModel methodsFor:'help - presentations'!
+
+showMeHowItWorks
+    self showMeHowItWorks:nil
+"/    ShowMeHowItWorks do: #(
+"/        show: 'this little presentation shows, how to find a method when the desired result is known'
+"/
+"/        intro
+"/        
+"/        (unless: ( isEmpty: ReceiverEditor ) do:(
+"/            (showing: 'you can clear the fields - by pressing the "Clear" button' do:(
+"/                    fastMoveTo: ClearButton
+"/                    click
+"/            ))
+"/        ))
+"/        
+"/        ( showing: 'start by choosing the number of arguments,' do:(
+"/            moveTo: AllowedArguments
+"/            select: '1 argument' 
+"/        ))  
+"/        (showing: 'Click into the "receiver" field' do:(
+"/            moveTo: ReceiverEditor
+"/            click 
+"/        ))
+"/        wait: 0.5
+"/        (showing: 'Enter a value (or expression) into "receiver" field' do:(
+"/            type: '10'
+"/        ))
+"/        wait: 0.5
+"/        (showing: 'Click into the "first argument" field' do:(
+"/            moveTo: Arg1Editor
+"/            click
+"/        ))
+"/        wait: 0.5
+"/        (showing: 'and enter a value for the argument' do:(
+"/            type: '1'
+"/        ))
+"/        wait: 0.5
+"/        (showing: 'Click into the "answer" field' do:(
+"/            fastMoveTo: AnswerEditor
+"/            click
+"/        ))
+"/        (showing: 'Enter the expected result value into the "answer" field' do:(
+"/            type: '11'
+"/        ))
+"/        wait: 0.5
+"/        (showing: 'and finally, Click on the "search" button' do:(
+"/            fastMoveTo: SearchButton
+"/            click
+"/        ))
+"/        show: 'now, the finder searches for combinations that produce the desired result' 
+"/        fastMoveTo: ResultList
+"/        show: 'and present code which would produce it in the answer list below' 
+"/        show: 'if you select any item there,' 
+"/        wait: 0.5
+"/        selectIndex: 2 
+"/        wait: 0.5
+"/        fastMoveTo: ImplementorsList
+"/        show: 'the implementations will be shown in the top right implementor list' 
+"/        show: 'if you select any item there,' 
+"/        selectIndex: 1 
+"/        wait: 0.5
+"/        show: 'the implementation is shown in the bottom code editor' 
+"/        fastMoveTo: CodeView
+"/        wait: 0.5
+"/        show: 'Thank you for watching, indeed' 
+"/    )
+
+    "Created: / 18-07-2019 / 21:59:06 / Claus Gittinger"
+    "Modified: / 19-07-2019 / 16:52:01 / Claus Gittinger"
+!
+
+showMeHowItWorks:minorKey
+    self showMeHowItWorks:minorKey in:self className
+
+!
+
+showMeHowItWorks:minorKey in:majorKey
+    |fn rsrcDir spec|
+
+    fn := majorKey.
+    minorKey notEmptyOrNil ifTrue:[
+        fn := fn,'_',minorKey
+    ].
+
+    rsrcDir := self class packageDirectory asFilename / 'resources' / 'shows'.
+    (rsrcDir exists) ifFalse:[
+        Dialog warn:'No presentations available for %1' with:fn.
+        ^ self
+    ].
+    {
+        ('_',Smalltalk language,'.show') .
+        ('_en','.show') .
+        '.show' .
+    } do:[:rest |
+        |triedFn|
+
+        triedFn := fn,rest.
+        (rsrcDir / triedFn) exists ifTrue:[
+            (rsrcDir / triedFn) readingFileWithEncoding:#utf8 do:[:s |
+                spec := Array readFrom:s.
+            ].
+            ShowMeHowItWorks do:spec.
+            ^ self
+        ]
+    ].
+    Dialog warn:'No presentations available for %1' with:fn.
+! !
+
 !ApplicationModel methodsFor:'help texts'!
 
 basicHelpTextForKey:aKey
@@ -3297,115 +3406,6 @@
 ! !
 
 
-!ApplicationModel methodsFor:'menu actions - help'!
-
-showMeHowItWorks
-    self showMeHowItWorks:nil
-"/    ShowMeHowItWorks do: #(
-"/        show: 'this little presentation shows, how to find a method when the desired result is known'
-"/
-"/        intro
-"/        
-"/        (unless: ( isEmpty: ReceiverEditor ) do:(
-"/            (showing: 'you can clear the fields - by pressing the "Clear" button' do:(
-"/                    fastMoveTo: ClearButton
-"/                    click
-"/            ))
-"/        ))
-"/        
-"/        ( showing: 'start by choosing the number of arguments,' do:(
-"/            moveTo: AllowedArguments
-"/            select: '1 argument' 
-"/        ))  
-"/        (showing: 'Click into the "receiver" field' do:(
-"/            moveTo: ReceiverEditor
-"/            click 
-"/        ))
-"/        wait: 0.5
-"/        (showing: 'Enter a value (or expression) into "receiver" field' do:(
-"/            type: '10'
-"/        ))
-"/        wait: 0.5
-"/        (showing: 'Click into the "first argument" field' do:(
-"/            moveTo: Arg1Editor
-"/            click
-"/        ))
-"/        wait: 0.5
-"/        (showing: 'and enter a value for the argument' do:(
-"/            type: '1'
-"/        ))
-"/        wait: 0.5
-"/        (showing: 'Click into the "answer" field' do:(
-"/            fastMoveTo: AnswerEditor
-"/            click
-"/        ))
-"/        (showing: 'Enter the expected result value into the "answer" field' do:(
-"/            type: '11'
-"/        ))
-"/        wait: 0.5
-"/        (showing: 'and finally, Click on the "search" button' do:(
-"/            fastMoveTo: SearchButton
-"/            click
-"/        ))
-"/        show: 'now, the finder searches for combinations that produce the desired result' 
-"/        fastMoveTo: ResultList
-"/        show: 'and present code which would produce it in the answer list below' 
-"/        show: 'if you select any item there,' 
-"/        wait: 0.5
-"/        selectIndex: 2 
-"/        wait: 0.5
-"/        fastMoveTo: ImplementorsList
-"/        show: 'the implementations will be shown in the top right implementor list' 
-"/        show: 'if you select any item there,' 
-"/        selectIndex: 1 
-"/        wait: 0.5
-"/        show: 'the implementation is shown in the bottom code editor' 
-"/        fastMoveTo: CodeView
-"/        wait: 0.5
-"/        show: 'Thank you for watching, indeed' 
-"/    )
-
-    "Created: / 18-07-2019 / 21:59:06 / Claus Gittinger"
-    "Modified: / 19-07-2019 / 16:52:01 / Claus Gittinger"
-!
-
-showMeHowItWorks:minorKey
-    self showMeHowItWorks:minorKey in:self className
-
-!
-
-showMeHowItWorks:minorKey in:majorKey
-    |fn rsrcDir spec|
-
-    fn := majorKey.
-    minorKey notEmptyOrNil ifTrue:[
-        fn := fn,'_',minorKey
-    ].
-
-    rsrcDir := self class packageDirectory asFilename / 'resources' / 'shows'.
-    (rsrcDir exists) ifFalse:[
-        Dialog warn:'No presentations available for %1' with:fn.
-        ^ self
-    ].
-    {
-        ('_',Smalltalk language,'.show') .
-        ('_en','.show') .
-        '.show' .
-    } do:[:rest |
-        |triedFn|
-
-        triedFn := fn,rest.
-        (rsrcDir / triedFn) exists ifTrue:[
-            (rsrcDir / triedFn) readingFileDo:[:s |
-                spec := Array readFrom:s.
-            ].
-            ShowMeHowItWorks do:spec.
-            ^ self
-        ]
-    ].
-    Dialog warn:'No presentations available for %1' with:fn.
-! !
-
 !ApplicationModel methodsFor:'opening'!
 
 hideWindows