ApplicationModel.st
changeset 4315 1a0e7c9e4f80
parent 4312 43dd2c6e924b
child 4316 a0550c30453e
equal deleted inserted replaced
4314:23fdaa63f239 4315:1a0e7c9e4f80
  3295     "Created: 5.7.1996 / 12:01:40 / cg"
  3295     "Created: 5.7.1996 / 12:01:40 / cg"
  3296     "Modified: 17.1.1997 / 19:44:09 / cg"
  3296     "Modified: 17.1.1997 / 19:44:09 / cg"
  3297 ! !
  3297 ! !
  3298 
  3298 
  3299 
  3299 
       
  3300 !ApplicationModel methodsFor:'menu actions - help'!
       
  3301 
       
  3302 showMeHowItWorks
       
  3303     self showMeHowItWorks:nil
       
  3304 "/    ShowMeHowItWorks do: #(
       
  3305 "/        show: 'this little presentation shows, how to find a method when the desired result is known'
       
  3306 "/
       
  3307 "/        intro
       
  3308 "/        
       
  3309 "/        (unless: ( isEmpty: ReceiverEditor ) do:(
       
  3310 "/            (showing: 'you can clear the fields - by pressing the "Clear" button' do:(
       
  3311 "/                    fastMoveTo: ClearButton
       
  3312 "/                    click
       
  3313 "/            ))
       
  3314 "/        ))
       
  3315 "/        
       
  3316 "/        ( showing: 'start by choosing the number of arguments,' do:(
       
  3317 "/            moveTo: AllowedArguments
       
  3318 "/            select: '1 argument' 
       
  3319 "/        ))  
       
  3320 "/        (showing: 'Click into the "receiver" field' do:(
       
  3321 "/            moveTo: ReceiverEditor
       
  3322 "/            click 
       
  3323 "/        ))
       
  3324 "/        wait: 0.5
       
  3325 "/        (showing: 'Enter a value (or expression) into "receiver" field' do:(
       
  3326 "/            type: '10'
       
  3327 "/        ))
       
  3328 "/        wait: 0.5
       
  3329 "/        (showing: 'Click into the "first argument" field' do:(
       
  3330 "/            moveTo: Arg1Editor
       
  3331 "/            click
       
  3332 "/        ))
       
  3333 "/        wait: 0.5
       
  3334 "/        (showing: 'and enter a value for the argument' do:(
       
  3335 "/            type: '1'
       
  3336 "/        ))
       
  3337 "/        wait: 0.5
       
  3338 "/        (showing: 'Click into the "answer" field' do:(
       
  3339 "/            fastMoveTo: AnswerEditor
       
  3340 "/            click
       
  3341 "/        ))
       
  3342 "/        (showing: 'Enter the expected result value into the "answer" field' do:(
       
  3343 "/            type: '11'
       
  3344 "/        ))
       
  3345 "/        wait: 0.5
       
  3346 "/        (showing: 'and finally, Click on the "search" button' do:(
       
  3347 "/            fastMoveTo: SearchButton
       
  3348 "/            click
       
  3349 "/        ))
       
  3350 "/        show: 'now, the finder searches for combinations that produce the desired result' 
       
  3351 "/        fastMoveTo: ResultList
       
  3352 "/        show: 'and present code which would produce it in the answer list below' 
       
  3353 "/        show: 'if you select any item there,' 
       
  3354 "/        wait: 0.5
       
  3355 "/        selectIndex: 2 
       
  3356 "/        wait: 0.5
       
  3357 "/        fastMoveTo: ImplementorsList
       
  3358 "/        show: 'the implementations will be shown in the top right implementor list' 
       
  3359 "/        show: 'if you select any item there,' 
       
  3360 "/        selectIndex: 1 
       
  3361 "/        wait: 0.5
       
  3362 "/        show: 'the implementation is shown in the bottom code editor' 
       
  3363 "/        fastMoveTo: CodeView
       
  3364 "/        wait: 0.5
       
  3365 "/        show: 'Thank you for watching, indeed' 
       
  3366 "/    )
       
  3367 
       
  3368     "Created: / 18-07-2019 / 21:59:06 / Claus Gittinger"
       
  3369     "Modified: / 19-07-2019 / 16:52:01 / Claus Gittinger"
       
  3370 !
       
  3371 
       
  3372 showMeHowItWorks:minorKey
       
  3373     self showMeHowItWorks:minorKey in:self className
       
  3374 
       
  3375 !
       
  3376 
       
  3377 showMeHowItWorks:minorKey in:majorKey
       
  3378     |fn rsrcDir spec|
       
  3379 
       
  3380     fn := majorKey.
       
  3381     minorKey notEmptyOrNil ifTrue:[
       
  3382         fn := fn,'_',minorKey
       
  3383     ].
       
  3384 
       
  3385     rsrcDir := self class packageDirectory asFilename / 'resources' / 'shows'.
       
  3386     (rsrcDir exists) ifFalse:[
       
  3387         Dialog warn:'No presentations available for %1' with:fn.
       
  3388         ^ self
       
  3389     ].
       
  3390     {
       
  3391         ('_',Smalltalk language,'.show') .
       
  3392         ('_en','.show') .
       
  3393         '.show' .
       
  3394     } do:[:rest |
       
  3395         |triedFn|
       
  3396 
       
  3397         triedFn := fn,rest.
       
  3398         (rsrcDir / triedFn) exists ifTrue:[
       
  3399             (rsrcDir / triedFn) readingFileDo:[:s |
       
  3400                 spec := Array readFrom:s.
       
  3401             ].
       
  3402             ShowMeHowItWorks do:spec.
       
  3403             ^ self
       
  3404         ]
       
  3405     ].
       
  3406     Dialog warn:'No presentations available for %1' with:fn.
       
  3407 ! !
       
  3408 
  3300 !ApplicationModel methodsFor:'opening'!
  3409 !ApplicationModel methodsFor:'opening'!
  3301 
  3410 
  3302 hideWindows
  3411 hideWindows
  3303     |wg|
  3412     |wg|
  3304 
  3413