MessageSend.st
author Claus Gittinger <cg@exept.de>
Sun, 02 Nov 1997 20:14:50 +0100
changeset 3089 0823aa17ac4d
parent 2473 dc61bb1e6d17
child 4392 26fb48f04e1b
permissions -rw-r--r--
checkin from browser
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
     1
"
4da5558d8141 Initial revision
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1994 by Claus Gittinger
344
claus
parents: 160
diff changeset
     3
	      All Rights Reserved
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
     4
4da5558d8141 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
4da5558d8141 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
4da5558d8141 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
4da5558d8141 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
4da5558d8141 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
4da5558d8141 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
4da5558d8141 Initial revision
claus
parents:
diff changeset
    11
"
4da5558d8141 Initial revision
claus
parents:
diff changeset
    12
4da5558d8141 Initial revision
claus
parents:
diff changeset
    13
Message subclass:#MessageSend
1183
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    14
	instanceVariableNames:'receiver'
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    15
	classVariableNames:''
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    16
	poolDictionaries:''
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    17
	category:'Kernel-Methods'
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
    18
!
4da5558d8141 Initial revision
claus
parents:
diff changeset
    19
4da5558d8141 Initial revision
claus
parents:
diff changeset
    20
!MessageSend class methodsFor:'documentation'!
4da5558d8141 Initial revision
claus
parents:
diff changeset
    21
4da5558d8141 Initial revision
claus
parents:
diff changeset
    22
copyright
4da5558d8141 Initial revision
claus
parents:
diff changeset
    23
"
4da5558d8141 Initial revision
claus
parents:
diff changeset
    24
 COPYRIGHT (c) 1994 by Claus Gittinger
344
claus
parents: 160
diff changeset
    25
	      All Rights Reserved
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
    26
4da5558d8141 Initial revision
claus
parents:
diff changeset
    27
 This software is furnished under a license and may be used
4da5558d8141 Initial revision
claus
parents:
diff changeset
    28
 only in accordance with the terms of that license and with the
4da5558d8141 Initial revision
claus
parents:
diff changeset
    29
 inclusion of the above copyright notice.   This software may not
4da5558d8141 Initial revision
claus
parents:
diff changeset
    30
 be provided or otherwise made available to, or used by, any
4da5558d8141 Initial revision
claus
parents:
diff changeset
    31
 other person.  No title to or ownership of the software is
4da5558d8141 Initial revision
claus
parents:
diff changeset
    32
 hereby transferred.
4da5558d8141 Initial revision
claus
parents:
diff changeset
    33
"
4da5558d8141 Initial revision
claus
parents:
diff changeset
    34
!
4da5558d8141 Initial revision
claus
parents:
diff changeset
    35
4da5558d8141 Initial revision
claus
parents:
diff changeset
    36
documentation
4da5558d8141 Initial revision
claus
parents:
diff changeset
    37
"
4da5558d8141 Initial revision
claus
parents:
diff changeset
    38
    Instances of MessageSend can be used for simulation programs.
4da5558d8141 Initial revision
claus
parents:
diff changeset
    39
    They keep some receiver, selector and arguments and can be evaluated
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    40
    at any time later. (basically, they are like MessageObjects, but keep
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    41
    the receiver in addition to the selector & arguments).
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    42
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
    43
    They can also be used as replacement for simple [self foo]-blocks.
4da5558d8141 Initial revision
claus
parents:
diff changeset
    44
    Of course, they could also be replaced by blocks such as
4da5558d8141 Initial revision
claus
parents:
diff changeset
    45
    '[receiver perform:selector withArguments:arguments]', 
344
claus
parents: 160
diff changeset
    46
    but blocks are somewhat more expensive in their creation and require
claus
parents: 160
diff changeset
    47
    more storage.
claus
parents: 160
diff changeset
    48
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    49
    If you plan to write a simulator and want to queue cillions of blocks,
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    50
    try to use MessageSends instead of blocks
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    51
    (or even: message, if the receiver is constant);
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    52
    this will save you a lot of memory.
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    53
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
    54
    However, the send-operation itself is faster in a block, since it
4da5558d8141 Initial revision
claus
parents:
diff changeset
    55
    will use a better caching scheme (inline-cache) for its send, while
4da5558d8141 Initial revision
claus
parents:
diff changeset
    56
    sending here is done with a #perform:, which is not inline-cached. 
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    57
    Also, blocks are more flexible, in that they allow access to local
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    58
    variables of the defining method - and work without a need to define an
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    59
    extra visited method (read literature on visitor patterns).
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    60
363
claus
parents: 344
diff changeset
    61
    Thus it is not sure, which one is actually better to use ...
claus
parents: 344
diff changeset
    62
claus
parents: 344
diff changeset
    63
    You can either store arguments in the messageSend object, or
claus
parents: 344
diff changeset
    64
    leave them undefined until the send is actually performed, and
claus
parents: 344
diff changeset
    65
    pass any arguments with the value:-messages.
1270
4e8058487ed3 commentary
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    66
4e8058487ed3 commentary
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    67
    [See also:]
4e8058487ed3 commentary
Claus Gittinger <cg@exept.de>
parents: 1269
diff changeset
    68
        Block  Message
1293
02fb05148c98 documentation
Claus Gittinger <cg@exept.de>
parents: 1270
diff changeset
    69
02fb05148c98 documentation
Claus Gittinger <cg@exept.de>
parents: 1270
diff changeset
    70
    [author:]
02fb05148c98 documentation
Claus Gittinger <cg@exept.de>
parents: 1270
diff changeset
    71
        Claus Gittinger
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    72
"
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    73
!
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
    74
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    75
examples
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    76
"
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
    77
    Example:
4da5558d8141 Initial revision
claus
parents:
diff changeset
    78
       |m|
4da5558d8141 Initial revision
claus
parents:
diff changeset
    79
4da5558d8141 Initial revision
claus
parents:
diff changeset
    80
       m := MessageSend receiver:1 selector:#+ arguments:#(2).
363
claus
parents: 344
diff changeset
    81
       m value. 
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
    82
1316
248a8cb2ae3b examples
Claus Gittinger <cg@exept.de>
parents: 1293
diff changeset
    83
248a8cb2ae3b examples
Claus Gittinger <cg@exept.de>
parents: 1293
diff changeset
    84
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    85
    is almost the same as:
344
claus
parents: 160
diff changeset
    86
       |m|
claus
parents: 160
diff changeset
    87
claus
parents: 160
diff changeset
    88
       m := [1+2].
363
claus
parents: 344
diff changeset
    89
       m value. 
344
claus
parents: 160
diff changeset
    90
claus
parents: 160
diff changeset
    91
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    92
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
    93
    Example2 (a simulation)
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    94
        |q|
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
    95
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    96
        q := Queue new.
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    97
        ...
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    98
        'put some action into the queue'
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
    99
        q nextPut:(MessageSend receiver:someone selector:#foo arguments:#().
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   100
        ...
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   101
        'evaluate next action from the queue'
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   102
        q next value
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   103
        ...
344
claus
parents: 160
diff changeset
   104
claus
parents: 160
diff changeset
   105
    if all sends are going to the same receiver, use:
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   106
        |q|
344
claus
parents: 160
diff changeset
   107
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   108
        q := Queue new.
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   109
        ...
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   110
        'put some action into the queue'
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   111
        q nextPut:(Message selector:#foo arguments:#().
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   112
        ...
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   113
        'evaluate next action from the queue'
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   114
        q next sendTo:someone
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   115
        ...
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
   116
"
4da5558d8141 Initial revision
claus
parents:
diff changeset
   117
! !
4da5558d8141 Initial revision
claus
parents:
diff changeset
   118
4da5558d8141 Initial revision
claus
parents:
diff changeset
   119
!MessageSend class methodsFor:'instance creation'!
4da5558d8141 Initial revision
claus
parents:
diff changeset
   120
2473
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   121
receiver:r selector:sel
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   122
    "create & return a new instance which can be used to
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   123
     send sel to some receiver, r"
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   124
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   125
    ^ self receiver:r selector:sel arguments:nil
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   126
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   127
    "
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   128
     (MessageSend receiver:nil selector:#foo) value
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   129
    "
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   130
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   131
    "Modified: 20.3.1997 / 21:55:16 / cg"
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   132
!
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   133
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
   134
receiver:r selector:sel arguments:argArray
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   135
    "create & return a new instance which can be used to
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   136
     send sel with arguments to some receiver, r"
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   137
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
   138
    |newMessage|
4da5558d8141 Initial revision
claus
parents:
diff changeset
   139
344
claus
parents: 160
diff changeset
   140
    newMessage := super new setSelector:sel arguments:argArray.
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
   141
    newMessage receiver:r.
4da5558d8141 Initial revision
claus
parents:
diff changeset
   142
    ^ newMessage
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   143
2473
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   144
    "
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   145
     (MessageSend receiver:nil selector:#foo: arguments:#(1)) value
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   146
    "
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   147
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   148
    "Modified: 20.3.1997 / 21:55:44 / cg"
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
   149
! !
4da5558d8141 Initial revision
claus
parents:
diff changeset
   150
1183
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   151
!MessageSend methodsFor:'accessing'!
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   152
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   153
numArgs
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   154
    "return the number of arguments of the message"
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   155
1183
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   156
    ^ selector numArgs
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   157
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   158
    "Modified: 23.4.1996 / 16:52:51 / cg"
1183
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   159
!
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   160
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   161
receiver
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   162
    "return the receiver of the message"
1183
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   163
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   164
    ^ receiver
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   165
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   166
    "Modified: 23.4.1996 / 16:52:59 / cg"
1183
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   167
!
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   168
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   169
receiver:r
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   170
    "set the receiver of the message"
1183
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   171
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   172
    receiver := r
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   173
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   174
    "Modified: 23.4.1996 / 16:53:04 / cg"
1183
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   175
! !
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   176
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
   177
!MessageSend methodsFor:'evaluation'!
4da5558d8141 Initial revision
claus
parents:
diff changeset
   178
4da5558d8141 Initial revision
claus
parents:
diff changeset
   179
value
160
5dae57a490bd *** empty log message ***
claus
parents: 96
diff changeset
   180
    "evaluate the messagesend with the original arguments"
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
   181
4da5558d8141 Initial revision
claus
parents:
diff changeset
   182
    ^ receiver perform:selector withArguments:args
4da5558d8141 Initial revision
claus
parents:
diff changeset
   183
!
4da5558d8141 Initial revision
claus
parents:
diff changeset
   184
4da5558d8141 Initial revision
claus
parents:
diff changeset
   185
value:someArgument
4da5558d8141 Initial revision
claus
parents:
diff changeset
   186
    "evaluate the messagesend, with someArgument instead of the original"
4da5558d8141 Initial revision
claus
parents:
diff changeset
   187
 
4da5558d8141 Initial revision
claus
parents:
diff changeset
   188
    ^ receiver perform:selector with:someArgument
4da5558d8141 Initial revision
claus
parents:
diff changeset
   189
!
4da5558d8141 Initial revision
claus
parents:
diff changeset
   190
4da5558d8141 Initial revision
claus
parents:
diff changeset
   191
value:arg1 value:arg2
160
5dae57a490bd *** empty log message ***
claus
parents: 96
diff changeset
   192
    "evaluate the messagesend, with arg1 and arg2 instead of the original
5dae57a490bd *** empty log message ***
claus
parents: 96
diff changeset
   193
     arguments"
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
   194
4da5558d8141 Initial revision
claus
parents:
diff changeset
   195
    ^  receiver perform:selector with:arg1 with:arg2
4da5558d8141 Initial revision
claus
parents:
diff changeset
   196
!
4da5558d8141 Initial revision
claus
parents:
diff changeset
   197
4da5558d8141 Initial revision
claus
parents:
diff changeset
   198
value:arg1 value:arg2 value:arg3
160
5dae57a490bd *** empty log message ***
claus
parents: 96
diff changeset
   199
    "evaluate the messagesend, with arg1, arg2 and arg3 instead of the original
5dae57a490bd *** empty log message ***
claus
parents: 96
diff changeset
   200
     arguments"
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
   201
4da5558d8141 Initial revision
claus
parents:
diff changeset
   202
    ^  receiver perform:selector with:arg1 with:arg2 with:arg3
363
claus
parents: 344
diff changeset
   203
!
claus
parents: 344
diff changeset
   204
claus
parents: 344
diff changeset
   205
valueWithArguments:argArray
claus
parents: 344
diff changeset
   206
    "evaluate the messagesend, with arguments taken from argArray,
claus
parents: 344
diff changeset
   207
     instead of the original arguments"
claus
parents: 344
diff changeset
   208
claus
parents: 344
diff changeset
   209
    ^  receiver perform:selector withArguments:argArray
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
   210
! !
4da5558d8141 Initial revision
claus
parents:
diff changeset
   211
4da5558d8141 Initial revision
claus
parents:
diff changeset
   212
!MessageSend methodsFor:'printing & storing'!
4da5558d8141 Initial revision
claus
parents:
diff changeset
   213
4da5558d8141 Initial revision
claus
parents:
diff changeset
   214
displayString
4da5558d8141 Initial revision
claus
parents:
diff changeset
   215
    "return a string for display in inspectors etc."
4da5558d8141 Initial revision
claus
parents:
diff changeset
   216
4da5558d8141 Initial revision
claus
parents:
diff changeset
   217
    ^ 'MessageSend(' , receiver displayString , '>>' , selector , ')'
4da5558d8141 Initial revision
claus
parents:
diff changeset
   218
!
4da5558d8141 Initial revision
claus
parents:
diff changeset
   219
4da5558d8141 Initial revision
claus
parents:
diff changeset
   220
printOn:aStream
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   221
    "append a printed representation of the receiver to aStream"
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
   222
4da5558d8141 Initial revision
claus
parents:
diff changeset
   223
    receiver printOn:aStream.
4da5558d8141 Initial revision
claus
parents:
diff changeset
   224
    aStream nextPutAll:'>>'.
4da5558d8141 Initial revision
claus
parents:
diff changeset
   225
    selector printOn:aStream
1269
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   226
77682b54144c commentary
Claus Gittinger <cg@exept.de>
parents: 1183
diff changeset
   227
    "Modified: 23.4.1996 / 16:53:35 / cg"
96
4da5558d8141 Initial revision
claus
parents:
diff changeset
   228
! !
1183
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   229
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   230
!MessageSend class methodsFor:'documentation'!
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   231
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   232
version
2473
dc61bb1e6d17 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   233
    ^ '$Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.13 1997-03-20 20:55:56 cg Exp $'
1183
e3d58d115e53 subclasses of fixed classes are still possible
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   234
! !