ShowMeHowItWorks.st
author Claus Gittinger <cg@exept.de>
Fri, 19 Jul 2019 16:53:23 +0200
changeset 3712 688f4186d4f2
parent 3711 a472042fd298
child 3713 fa10e87dbf04
permissions -rw-r--r--
#UI_ENHANCEMENT by cg class: MethodFinderWindow changed: #showMeHowItWorks
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
     1
"{ Encoding: utf8 }"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
     2
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"{ Package: 'stx:libtool2' }"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
"{ NameSpace: Smalltalk }"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
Object subclass:#ShowMeHowItWorks
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
     8
	instanceVariableNames:'opStream lastComponentName lastComponent lastResult'
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
	classVariableNames:''
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
	poolDictionaries:''
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
	category:'Interface-Help'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
!ShowMeHowItWorks class methodsFor:'documentation'!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
documentation
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
    documentation to be added.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
    class:
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
        <a short class summary here, describing what instances represent>
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
    responsibilities:    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
        <describing what my main role is>
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
    collaborators:    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
        <describing with whom and how I talk to>
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
    API:
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
        <public api and main messages>
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
        
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
    example:
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
        <a one-line examples on how to use - can also be in a separate example method>
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
    implementation:
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
        <implementation points>
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
    [author:]
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
        Claus Gittinger
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
    [instance variables:]
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
    [class variables:]
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
    [see also:]
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
example
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
    ShowMeHowItWorks do:#(
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
        ( showing: 'Choose the number of arguments' do:(
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
            moveTo: NumberOfArguments
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
            select: '1' 
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
        ))  
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
        (showing: 'Click into the "receiver" field' do:(
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
            moveTo: ReceiverEditor
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
            click: ReceiverEditor 
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
        ))
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
        (showing: 'Enter a value (or expression) into "receiver" field' do:(
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
            enter: '100'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
        ))
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
        (showing: 'Click into the "first argument" field' do:(
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
            moveTo: Arg1Editor
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
            click: ReceiverEditor
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
        ))
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
        (showing: 'Enter a value (or expression) into "receiver" field' do:(
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
            enter: '100'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
        ))
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
    )
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
! !
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
!ShowMeHowItWorks class methodsFor:'running'!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
do:specArray
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
    self doStream:specArray readStream
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
    "Created: / 19-07-2019 / 10:52:59 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
    "Modified: / 19-07-2019 / 14:30:43 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
doStream:specStream
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
    "must run as a separate process;
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
     otherwise - if started by the app itself -
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
     no events will be processed while running"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
     
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
    [
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
        self new doStream:specStream
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
    ] fork.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
    "Created: / 19-07-2019 / 10:53:07 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
    "Modified (comment): / 19-07-2019 / 14:30:29 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
! !
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
!ShowMeHowItWorks methodsFor:'commands'!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
    98
intro
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
    99
    <action>
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   100
    
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   101
    self tell:'you can stopp the shou - by pressing - the shiftkee'.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   102
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   103
    "Created: / 19-07-2019 / 15:49:19 / Claus Gittinger"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   104
!
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   105
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
pause
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
    <action>
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
    
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   109
    Dialog information:(self class classResources stringWithCRs:'Show Paused.\Click on "OK" to proceed')
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
    "Created: / 19-07-2019 / 15:03:17 / Claus Gittinger"
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   112
    "Modified: / 19-07-2019 / 16:13:33 / Claus Gittinger"
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   115
show:message
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   116
    "execute operations while showing (and speaking) some message."
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   117
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   118
    <action>
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   119
    
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   120
    self showing:message do:nil
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   121
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   122
    "Created: / 19-07-2019 / 15:59:18 / Claus Gittinger"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   123
!
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   124
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   125
showing:message do:operationsOrNothing
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
    "execute operations while showing (and speaking) some message."
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   128
    <action>
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   129
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   130
    |messageView talkDone|
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   132
    self assert:(operationsOrNothing isNil or:[operationsOrNothing isSequenceable]).
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
    messageView := ActiveHelpView for:message.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
    "/ messageView shapeStyle:#cartoon.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
    [
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
        messageView realize.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
        self talking ifTrue:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
            talkDone := Semaphore new.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
            [
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
                self tell:message.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
                talkDone signal
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
            ] fork.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
            
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
            "/
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   147
            "/ allow speaker some headoff
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
            Delay waitForSeconds:(message size / 20).
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
        ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   151
        operationsOrNothing notEmptyOrNil ifTrue:[
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   152
            self doStream:(operationsOrNothing readStream).
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   153
        ].
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
    ] ensure:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
        messageView destroy
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
    ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
    self talking ifTrue:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
        talkDone wait.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
    ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
    "Created: / 19-07-2019 / 11:19:27 / Claus Gittinger"
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   162
    "Modified: / 19-07-2019 / 15:59:52 / Claus Gittinger"
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
wait:seconds
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
    <action>
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
    Delay waitForSeconds:seconds
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
    "Created: / 19-07-2019 / 15:09:45 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   171
! !
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   173
!ShowMeHowItWorks methodsFor:'commands - checking'!
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   174
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   175
isEmpty:componentName
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   176
    <action>
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   177
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   178
    |component|
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   179
    
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   180
    component := self componentNamed:componentName.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   181
    component isScrollWrapper ifTrue:[ component := component scrolledView ].
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   182
    component isTextView ifTrue:[
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   183
        ^ component contents isEmptyOrNil
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   184
    ] ifFalse:[
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   185
        self halt.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   186
    ].
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   187
    self error:'isEmpty: unhandled component type: ',component displayString.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   188
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   189
    "Created: / 19-07-2019 / 15:33:47 / Claus Gittinger"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   190
!
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   191
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   192
unless:query do:actions
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   193
    <action>
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   194
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   195
    |result|
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   196
    
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   197
    result := self doCommand:query.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   198
    result ifFalse:[
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   199
        self doCommand:actions
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   200
    ].
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   201
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   202
    "Created: / 19-07-2019 / 15:33:32 / Claus Gittinger"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   203
! !
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   204
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   205
!ShowMeHowItWorks methodsFor:'commands - mouse & keyboard'!
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   206
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   207
click
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   208
    "press-release"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   209
    
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   210
    <action>
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   211
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   212
    ^ self click:1 inComponent:lastComponent
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   213
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   214
    "Created: / 19-07-2019 / 16:11:03 / Claus Gittinger"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   215
!
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
click:buttonNr
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
    "press-release"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   220
    <action>
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   222
    self assert:(buttonNr isInteger).
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   223
    ^ self click:buttonNr inComponent:lastComponent
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   225
    "Created: / 19-07-2019 / 13:21:20 / Claus Gittinger"
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   226
    "Modified: / 19-07-2019 / 16:10:19 / Claus Gittinger"
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   229
clickIn:componentName
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   230
    "press-release"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   231
    
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   232
    <action>
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   233
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   234
    ^ self click:1 inComponent:(self componentNamed:componentName)
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   235
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   236
    "Created: / 19-07-2019 / 16:09:58 / Claus Gittinger"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   237
!
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   238
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   239
fastMoveTo:componentName
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   240
    "move the mouse to componentName without circling"
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
    <action>
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   243
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   244
    |component|
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   245
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   246
    component := self componentNamed:componentName.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   247
    self movePointerToComponent:component.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   248
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   249
    "Created: / 19-07-2019 / 15:39:23 / Claus Gittinger"
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
moveTo:componentName
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
    "move the mouse to componentName,
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
     then circle around it a few times"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
    <action>
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
    |component|
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   260
    component := self componentNamed:componentName.
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   261
    self movePointerToComponent:component.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
    self circlePointerAroundComponent:component.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
    "Created: / 19-07-2019 / 11:20:42 / Claus Gittinger"
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   265
    "Modified: / 19-07-2019 / 15:38:11 / Claus Gittinger"
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   266
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   267
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   268
select:itemsLabel
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   269
    "select an item by label,
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   270
     allowed after moving to:
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   271
        aComboBox
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
        aSelectionInListView
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   273
    "    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
    <action>
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
    |idx|
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   278
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
    (lastComponent isKindOf:ComboView) ifTrue:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
        "/ click on the menubutton
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   281
        self movePointerToComponent:lastComponent menuButton.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   282
        self click:1 inComponent:lastComponent menuButton.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   283
        Delay waitForSeconds:0.3.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
        (idx := lastComponent list indexOf:itemsLabel ifAbsent:[nil]) isNil ifTrue:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   285
            self error:'no such item in comboList: ',itemsLabel
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   286
        ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   287
        lastComponent select:idx.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   288
        Delay waitForSeconds:0.3.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   289
        lastComponent shownMenu notNil ifTrue:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   290
            lastComponent shownMenu hide.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   291
        ].    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   292
        ^ self
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   293
    ].    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   294
    self error:'cannot select this component'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   295
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   296
    "Created: / 19-07-2019 / 12:34:25 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   297
    "Modified (format): / 19-07-2019 / 14:55:34 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   298
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   299
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   300
selectIndex:itemsIndex
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
    "select an item by index,
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
     allowed after moving to:
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   303
        aComboBox
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
        aSelectionInListView
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   305
    "    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   306
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   307
    <action>
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   308
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   309
    |widget y offset|
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   310
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   311
    (widget := lastComponent) isScrollWrapper ifTrue:[
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   312
        widget := widget scrolledView
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   313
    ].
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   314
    
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   315
    (widget isKindOf:ComboView) ifTrue:[
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
        "/ click on the menubutton
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   317
        self movePointerToComponent:widget menuButton.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   318
        self click:1 inComponent:widget menuButton.
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   319
        Delay waitForSeconds:0.5.
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   320
        widget select:itemsIndex.
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   321
        Delay waitForSeconds:0.5.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   322
self halt.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   323
        ^ self
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   324
    ].    
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   325
    (widget isKindOf:SelectionInListView) ifTrue:[
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   326
        "/ click on the item
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   327
        y := widget yOfLine:itemsIndex.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   328
        offset := (widget width // 2) @ y.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   329
        self movePointerToComponent:widget offset:offset.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   330
        widget simulateButtonPress:1 at:offset sendDisplayEvent:false.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   331
        Delay waitForSeconds:(self clickTime).
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   332
        widget simulateButtonRelease:1 at:offset sendDisplayEvent:false.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   333
        Delay waitForSeconds:0.5.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   334
        ^ self
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   335
    ].    
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
    self error:'cannot select this component'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   338
    "Created: / 19-07-2019 / 14:20:11 / Claus Gittinger"
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   339
    "Modified: / 19-07-2019 / 16:22:47 / Claus Gittinger"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   340
!
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   341
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   342
type:aString
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   343
    "enter text into the last component"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   344
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   345
    <action>
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   346
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   347
    lastComponent simulateTextInput:aString at:(lastComponent extent // 2) sendDisplayEvent:false
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   348
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   349
    "Created: / 19-07-2019 / 15:50:40 / Claus Gittinger"
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   350
! !
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   351
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
!ShowMeHowItWorks methodsFor:'defaults'!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   353
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   354
circlingCount
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   355
    "circle around move-end position that many times"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   356
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   357
    ^ 3
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   358
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
    "Created: / 19-07-2019 / 13:03:45 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   361
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   362
circlingRadius 
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   363
    "radius when circling"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   364
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   365
    ^ 30 "/ pixels
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   366
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
    "Created: / 19-07-2019 / 13:07:59 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   368
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   369
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   370
circlingSpeed 
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   371
    "time per round when circling"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   372
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   373
    ^ 0.3 seconds.       "/ time per round
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   374
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   375
    "Created: / 19-07-2019 / 13:02:34 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   376
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   377
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
clickTime
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   379
    "when clicking"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   380
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   381
    ^ self shortClickTime
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   382
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   383
    "Created: / 19-07-2019 / 13:17:20 / Claus Gittinger"
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   384
    "Modified: / 19-07-2019 / 15:21:51 / Claus Gittinger"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   385
!
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   386
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   387
longClickTime
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   388
    "when clicking buttons"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   389
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   390
    ^ 500 milliseconds
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   391
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   392
    "Created: / 19-07-2019 / 15:21:42 / Claus Gittinger"
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   393
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   394
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   395
pointerAnimationDelay
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   396
    ^ 50 milliseconds.   "/ 20 updates per second
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   397
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   398
    "Created: / 19-07-2019 / 13:04:45 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   399
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   400
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   401
pointerMoveSpeed
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   402
    ^ 400.   "/ pixels per second
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   403
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   404
    "Created: / 19-07-2019 / 13:05:40 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   405
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   406
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   407
shortClickTime
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   408
    "when clicking"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   409
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   410
    ^ 100 milliseconds
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   411
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   412
    "Created: / 19-07-2019 / 15:21:29 / Claus Gittinger"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   413
!
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   414
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   415
talking
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   416
    ^ true
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   417
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   418
    "Created: / 19-07-2019 / 14:31:14 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   419
! !
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   420
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   421
!ShowMeHowItWorks methodsFor:'helper'!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   422
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   423
componentNamed:componentName
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   424
    "retrieve a component by name or report an error if not found"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   425
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   426
    |component|
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   427
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   428
    lastComponentName := componentName.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   429
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   430
    component := self findComponent:componentName.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   431
    component isNil ifTrue:[
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   432
        self error:'no component found for: ',componentName.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   433
    ].
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   434
    lastComponent := component.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   435
    ^ component
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   436
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   437
    "Created: / 19-07-2019 / 15:37:35 / Claus Gittinger"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   438
!
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   439
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   440
findComponent:componentName
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   441
    "find a component by name - in the active and possibly in any app"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   442
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   443
    |app component candidates|
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   444
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   445
    app := WindowGroup activeMainApplication.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   446
    app notNil ifTrue:[ 
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
        component := self findComponent:componentName in:app.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   448
    ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   449
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   450
    component isNil ifTrue:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   451
        "/ search through all current applications
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   452
        candidates := OrderedCollection new.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   453
        WindowGroup scheduledWindowGroups do:[:eachWG |
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   454
            |eachApp|
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   455
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   456
            (eachApp := eachWG application) notNil ifTrue:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   457
                component := self findComponent:componentName in:eachApp.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   458
                component notNil ifTrue:[ 
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   459
                    candidates add:component
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   460
                ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   461
            ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   462
        ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   463
        
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   464
        candidates size == 1 ifTrue:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   465
            component := candidates first
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   466
        ] ifFalse:[    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   467
            candidates notEmpty ifTrue:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   468
                self error:'multiple components found by name: ',componentName.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   469
            ]    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   470
        ].    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   471
    ].    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   472
    ^ component
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   473
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   474
    "Created: / 19-07-2019 / 12:02:30 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   475
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   476
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   477
findComponent:componentName in:anApplication
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   478
    |component componentNameSymbol foundByName foundByTitle foundByLabel|
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   479
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   480
    (component := anApplication componentAt:componentName) notNil ifTrue:[^ component].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   481
    (componentNameSymbol := componentName asSymbolIfInterned) notNil ifTrue:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   482
        (component := anApplication componentAt:componentNameSymbol) notNil ifTrue:[^ component].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   483
    ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   484
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   485
    "/ mhmh - search through all widgets of anApplication; 
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   486
    "/ maybe it was not created via the builder/spec,
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   487
    "/ or it has changed its name.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   488
    "/ look for: widget's name, widget's title, widget's label
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   489
    foundByName := OrderedCollection new. 
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   490
    foundByTitle := OrderedCollection new. 
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   491
    foundByLabel := OrderedCollection new.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   492
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   493
    anApplication window allSubViewsDo:[:each |
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   494
        [
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   495
            each name = componentName ifTrue:[ foundByName add:each ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   496
        ] on:MessageNotUnderstood do:[:ex | ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   497
        [
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   498
            each title = componentName ifTrue:[ foundByTitle add:each ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   499
        ] on:MessageNotUnderstood do:[:ex | ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   500
        [
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   501
            each label = componentName ifTrue:[ foundByLabel add:each ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   502
        ] on:MessageNotUnderstood do:[:ex | ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   503
    ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   504
    foundByName notEmpty ifTrue:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   505
        self assert:(foundByName size == 1) message:'multiple components found by name'.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   506
        ^ foundByName first.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   507
    ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   508
    foundByTitle notEmpty ifTrue:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   509
        self assert:(foundByTitle size == 1) message:'multiple components found by title'.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   510
        ^ foundByTitle first.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   511
    ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   512
    foundByLabel notEmpty ifTrue:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   513
        self assert:(foundByLabel size == 1) message:'multiple components found by label'.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   514
        ^ foundByLabel first.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   515
    ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   516
    ^ component
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   517
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   518
    "Created: / 19-07-2019 / 11:36:21 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   519
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   520
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   521
tell:message
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   522
    self talking ifTrue:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   523
        OperatingSystem speak:message.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   524
    ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   525
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   526
    "Created: / 19-07-2019 / 14:57:50 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   527
! !
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   528
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   529
!ShowMeHowItWorks methodsFor:'helpers - broken'!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   530
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   531
click:buttonNr atPosition:position
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   532
    "press-release at position"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   533
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   534
    |screen|
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   535
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   536
    screen := Screen current.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   537
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   538
    screen setPointerPosition:position.    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   539
    screen flush.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   540
    self click:buttonNr
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   541
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   542
    "Created: / 19-07-2019 / 13:14:51 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   543
! !
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   544
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   545
!ShowMeHowItWorks methodsFor:'helpers - mouse movement'!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   546
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   547
circlePointerAroundComponent:component
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   548
    "circle around it a few times"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   549
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   550
    self circlePointerAroundPosition:(component screenBounds center rounded)
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   551
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   552
    "Created: / 19-07-2019 / 13:12:35 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   553
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   554
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   555
circlePointerAroundPosition:position
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   556
    "circle around it a few times"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   557
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   558
    |screen stepDelayTime numCircles circlingSpeed radius|
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   559
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   560
    screen := Screen current.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   561
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   562
    circlingSpeed := self circlingSpeed.    "/ time per round
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   563
    numCircles := self circlingCount.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   564
    stepDelayTime := self pointerAnimationDelay.   "/ update interval
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   565
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   566
    radius := self circlingRadius.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   567
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   568
    "/ move it around a few times
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   569
    1 to:numCircles do:[:round |
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   570
        |n angle|
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   571
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   572
        n := circlingSpeed / stepDelayTime. "/ nr of steps per circle
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   573
        angle := 360 / n.                   "/ angle-delta per step
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   574
        1 to:n do:[:step |
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   575
            |a x y|
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   576
            
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   577
            a := angle * step.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   578
            "/ clockwise starting above the center
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   579
            x := position x + (radius * a degreesToRadians sin).
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   580
            y := position y + (radius * a degreesToRadians cos).
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   581
"/ Transcript showCR:(x@y).
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   582
            screen setPointerPosition:(x@y) rounded.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   583
            screen flush.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   584
            Delay waitFor:stepDelayTime.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   585
        ].    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   586
        "/ and back
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   587
        screen setPointerPosition:position rounded.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   588
        screen flush.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   589
        Delay waitFor:stepDelayTime.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   590
    ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   591
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   592
    "Created: / 19-07-2019 / 13:12:40 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   593
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   594
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   595
movePointerToComponent:aWidget
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   596
    "move the mouse to aWidget's center"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   597
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   598
    self movePointerToPosition:(aWidget screenBounds center rounded).
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   599
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   600
    "Created: / 19-07-2019 / 13:11:33 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   601
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   602
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   603
movePointerToComponent:aWidget offset:offset
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   604
    "move the mouse to position inside aWidget's"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   605
    
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   606
    self movePointerToPosition:(aWidget screenBounds origin + offset) rounded.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   607
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   608
    "Created: / 19-07-2019 / 16:18:58 / Claus Gittinger"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   609
!
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   610
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   611
movePointerToPosition:newPosition
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   612
    "move the mouse to newPosition"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   613
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   614
    |screen distance start numSteps moveTime stepDelayTime delta|
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   615
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   616
    screen := Screen current.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   617
    start := screen pointerPosition.   
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   618
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   619
    distance := start dist:newPosition.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   620
    moveTime := (distance / self pointerMoveSpeed) seconds. "/ time to move
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   621
    stepDelayTime := self pointerAnimationDelay.            "/ update every 50ms
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   622
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   623
    numSteps := moveTime / stepDelayTime.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   624
    numSteps = 0 ifTrue:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   625
        "/ already there
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   626
        ^ self
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   627
    ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   628
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   629
    delta := (newPosition - start) / numSteps.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   630
    1 to:numSteps do:[:step |
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   631
        |p|
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   632
        
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   633
        p := (start + (delta * step)) rounded.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   634
"/ Transcript showCR:p.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   635
        screen setPointerPosition:p.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   636
        screen flush.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   637
        Delay waitFor:stepDelayTime.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   638
    ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   639
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   640
    "Created: / 19-07-2019 / 12:57:30 / Claus Gittinger"
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   641
! !
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   642
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   643
!ShowMeHowItWorks methodsFor:'menu actions - mouse buttons'!
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   644
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   645
click:buttonNr inComponent:component
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   646
    "press-release in a component"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   647
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   648
    |t|
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   649
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   650
    t := self shortClickTime.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   651
    (component isKindOf:Button) ifTrue:[
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   652
        t := self longClickTime
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   653
    ].    
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   654
    self click:buttonNr inComponent:component clickTime:t
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   655
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   656
    "Created: / 19-07-2019 / 13:18:27 / Claus Gittinger"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   657
    "Modified: / 19-07-2019 / 15:22:47 / Claus Gittinger"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   658
!
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   659
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   660
click:buttonNr inComponent:component clickTime:clickTime 
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   661
    "press-release in a component"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   662
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   663
    component simulateButtonPress:buttonNr at:(component extent // 2) sendDisplayEvent:false.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   664
    Delay waitForSeconds:clickTime.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   665
    component simulateButtonRelease:buttonNr at:(component extent // 2) sendDisplayEvent:false.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   666
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   667
"/    self click:buttonNr atPosition:(component extent // 2)
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   668
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   669
    "Created: / 19-07-2019 / 15:21:05 / Claus Gittinger"
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   670
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   671
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   672
press:buttonNr
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   673
    "press at the current position"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   674
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   675
    |position screen x y|
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   676
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   677
    screen := Screen current.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   678
    position := screen pointerPosition.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   679
    x := position x.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   680
    y := position y.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   681
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   682
    self movePointerToPosition:position.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   683
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   684
    false "OperatingSystem isOSXlike" ifTrue:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   685
        |osxPos|
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   686
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   687
        osxPos := OperatingSystem getMousePosition.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   688
        x := osxPos x rounded.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   689
        y := osxPos y rounded.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   690
        OperatingSystem generateButtonEvent:buttonNr down:true x:x y:y.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   691
        ^ self.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   692
    ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   693
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   694
    screen sendKeyOrButtonEvent:#buttonPress x:x y:y keyOrButton:buttonNr state:0 toViewId:(screen rootWindowId).
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   695
    screen flush.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   696
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   697
    "Created: / 19-07-2019 / 13:52:38 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   698
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   699
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   700
release:buttonNr
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   701
    "press-release at the current position"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   702
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   703
    |position screen x y|
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   704
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   705
    screen := Screen current.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   706
    position := screen pointerPosition.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   707
    x := position x.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   708
    y := position y.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   709
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   710
    self movePointerToPosition:position.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   711
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   712
    false "OperatingSystem isOSXlike" ifTrue:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   713
        |osxPos|
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   714
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   715
        osxPos := OperatingSystem getMousePosition.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   716
        x := osxPos x rounded.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   717
        y := osxPos y rounded.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   718
        OperatingSystem generateButtonEvent:buttonNr down:false x:x y:y.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   719
        ^ self.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   720
    ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   721
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   722
    screen sendKeyOrButtonEvent:#buttonRelease x:x y:y keyOrButton:buttonNr state:0 toViewId:(screen rootWindowId).
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   723
    screen flush.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   724
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   725
    "Created: / 19-07-2019 / 13:53:05 / Claus Gittinger"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   726
! !
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   727
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   728
!ShowMeHowItWorks methodsFor:'running'!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   729
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   730
doCommand:op
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   731
    |numArgs sel args method|
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   732
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   733
    op isArray ifTrue:[
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   734
        op first isArray ifTrue:[
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   735
            self doStream:op readStream.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   736
            ^ self.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   737
        ].
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   738
        
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   739
        "/ construct a selector from keyword parts at odd indices
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   740
        sel := ((op with:(1 to:op size) select:[:el :idx | idx odd]) asStringWith:'') asSymbol.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   741
        "/ construct arg vector from parts at even indices
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   742
        args := op with:(1 to:op size) select:[:el :idx | idx even].
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   743
    ] ifFalse:[
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   744
        sel := op.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   745
        numArgs := sel argumentCount.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   746
        args := opStream next:numArgs.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   747
    ].
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   748
    
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   749
    (self respondsTo:sel) ifFalse:[
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   750
        self error:'bad operation: ',sel
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   751
    ].
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   752
    method := self class lookupMethodFor:sel.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   753
    (method hasAnnotation:#action) ifFalse:[self halt].
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   754
    
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   755
    lastResult := self perform:sel withArguments:args.
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   756
    ^ lastResult
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   757
    
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   758
"<<END
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   759
     ShowMeHowItWorks do:#(
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   760
        showing: 'Choose the number of arguments'
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   761
        do: (
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   762
            moveTo: NumberOfArguments
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   763
            select: '1'
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   764
        )    
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   765
        showing: 'Click into the "receiver" field'
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   766
        do: (
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   767
            moveTo: ReceiverEditor
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   768
            click: ReceiverEditor
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   769
        )
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   770
        showing: 'Enter a value (or expression) into "receiver" field'
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   771
        do: (
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   772
            enter: '100'
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   773
        )
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   774
        showing: 'Click into the "first argument" field'
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   775
        do: (
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   776
            moveTo: Arg1Editor
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   777
            click: ReceiverEditor
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   778
        )
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   779
        showing: 'Enter a value (or expression) into "receiver" field'
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   780
        do: (
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   781
            enter: '100'
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   782
        )
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   783
     )
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   784
END"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   785
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   786
    "Created: / 19-07-2019 / 15:34:55 / Claus Gittinger"
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   787
!
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   788
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   789
doStream:specStream
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   790
    |previousStream|
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   791
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   792
    previousStream := opStream.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   793
    [
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   794
        opStream := specStream.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   795
        [opStream atEnd] whileFalse:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   796
            self nextCommand.
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   797
            Display shiftDown ifTrue:[
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   798
                self tell:'you stopped the shou, thank you, for watching'.
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   799
                ^ AbortOperationRequest raise
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   800
            ].    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   801
        ].    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   802
    ] ensure:[
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   803
        opStream := previousStream
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   804
    ].
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   805
    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   806
"<<END
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   807
     ShowMeHowItWorks do:#(
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   808
        showing: 'Choose the number of arguments'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   809
        do: (
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   810
            moveTo: NumberOfArguments
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   811
            select: '1'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   812
        )    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   813
        showing: 'Click into the "receiver" field'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   814
        do: (
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   815
            moveTo: ReceiverEditor
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   816
            click: ReceiverEditor
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   817
        )
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   818
        showing: 'Enter a value (or expression) into "receiver" field'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   819
        do: (
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   820
            enter: '100'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   821
        )
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   822
        showing: 'Click into the "first argument" field'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   823
        do: (
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   824
            moveTo: Arg1Editor
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   825
            click: ReceiverEditor
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   826
        )
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   827
        showing: 'Enter a value (or expression) into "receiver" field'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   828
        do: (
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   829
            enter: '100'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   830
        )
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   831
     )
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   832
END"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   833
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   834
    "Created: / 19-07-2019 / 10:52:24 / Claus Gittinger"
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   835
    "Modified: / 19-07-2019 / 16:02:51 / Claus Gittinger"
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   836
!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   837
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   838
nextCommand
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   839
    self doCommand:(opStream next).
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   840
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   841
"<<END
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   842
     ShowMeHowItWorks do:#(
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   843
        showing: 'Choose the number of arguments'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   844
        do: (
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   845
            moveTo: NumberOfArguments
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   846
            select: '1'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   847
        )    
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   848
        showing: 'Click into the "receiver" field'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   849
        do: (
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   850
            moveTo: ReceiverEditor
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   851
            click: ReceiverEditor
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   852
        )
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   853
        showing: 'Enter a value (or expression) into "receiver" field'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   854
        do: (
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   855
            enter: '100'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   856
        )
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   857
        showing: 'Click into the "first argument" field'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   858
        do: (
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   859
            moveTo: Arg1Editor
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   860
            click: ReceiverEditor
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   861
        )
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   862
        showing: 'Enter a value (or expression) into "receiver" field'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   863
        do: (
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   864
            enter: '100'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   865
        )
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   866
     )
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   867
END"
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   868
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   869
    "Created: / 19-07-2019 / 10:54:04 / Claus Gittinger"
3711
a472042fd298 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3700
diff changeset
   870
    "Modified: / 19-07-2019 / 15:35:15 / Claus Gittinger"
3700
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   871
! !
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   872
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   873
!ShowMeHowItWorks class methodsFor:'documentation'!
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   874
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   875
version_CVS
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   876
    ^ '$Header$'
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   877
! !
34af8cf33242 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   878