MessageSend.st
branchjv
changeset 18120 e3a375d5f6a8
parent 18011 deb0c3355881
parent 17696 bdccf4ca66ba
child 23547 c69c97cec351
equal deleted inserted replaced
18119:cb7a12afe736 18120:e3a375d5f6a8
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 1994 by Claus Gittinger
     4  COPYRIGHT (c) 1994 by Claus Gittinger
     3 	      All Rights Reserved
     5 	      All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
     9  other person.  No title to or ownership of the software is
    11  other person.  No title to or ownership of the software is
    10  hereby transferred.
    12  hereby transferred.
    11 "
    13 "
    12 "{ Package: 'stx:libbasic' }"
    14 "{ Package: 'stx:libbasic' }"
    13 
    15 
       
    16 "{ NameSpace: Smalltalk }"
       
    17 
    14 Message subclass:#MessageSend
    18 Message subclass:#MessageSend
    15 	instanceVariableNames:'receiver'
    19 	instanceVariableNames:'receiver'
    16 	classVariableNames:''
    20 	classVariableNames:''
    17 	poolDictionaries:''
    21 	poolDictionaries:''
    18 	category:'Kernel-Methods'
    22 	category:'Kernel-Methods'
   156     "
   160     "
   157      (MessageSend receiver:nil selector:#foo: arguments:#(1)) value
   161      (MessageSend receiver:nil selector:#foo: arguments:#(1)) value
   158     "
   162     "
   159 
   163 
   160     "Modified: 20.3.1997 / 21:55:44 / cg"
   164     "Modified: 20.3.1997 / 21:55:44 / cg"
       
   165 ! !
       
   166 
       
   167 !MessageSend methodsFor:'Compatibility-Squeak'!
       
   168 
       
   169 cull: optionalFirstArg 
       
   170     "activate the receiver with one or zero arguments.
       
   171      Squeak compatibility, but also present in VW Smalltalk"
       
   172 
       
   173     selector numArgs >= 1 ifTrue:[^ self value:optionalFirstArg].
       
   174     ^ self value
       
   175 
       
   176     "Modified: / 03-06-2014 / 12:40:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   177 !
       
   178 
       
   179 cull: optionalFirstArg cull: optionalSecondArg
       
   180     "activate the receiver with two or less arguments.
       
   181      Squeak compatibility, but also present in VW Smalltalk"
       
   182 
       
   183     | nargs |
       
   184 
       
   185     nargs := selector numArgs.
       
   186     nargs >= 2 ifTrue:[^ self value:optionalFirstArg value:optionalSecondArg].
       
   187     nargs = 1 ifTrue:[^ self value:optionalFirstArg].
       
   188     ^ self value
       
   189 
       
   190     "Modified (format): / 03-06-2014 / 12:40:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   191 !
       
   192 
       
   193 cull: firstArg cull: optionalSecondArg cull: optionalThirdArg
       
   194     "activate the receiver with three or less arguments.
       
   195      Squeak compatibility, but also present in VW Smalltalk"
       
   196 
       
   197     | nargs |
       
   198 
       
   199     nargs := selector numArgs.
       
   200     nargs >= 2 ifTrue:[
       
   201         nargs >= 3 ifTrue:[
       
   202             ^ self value:firstArg value:optionalSecondArg value:optionalThirdArg
       
   203         ].
       
   204         ^ self value:firstArg value:optionalSecondArg
       
   205     ].
       
   206     nargs = 1 ifTrue:[^ self value:firstArg].
       
   207     ^ self value
       
   208 
       
   209     "Modified: / 03-06-2014 / 12:40:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   161 ! !
   210 ! !
   162 
   211 
   163 !MessageSend methodsFor:'Compatibility-V''Age'!
   212 !MessageSend methodsFor:'Compatibility-V''Age'!
   164 
   213 
   165 evaluate
   214 evaluate
   304 ! !
   353 ! !
   305 
   354 
   306 !MessageSend class methodsFor:'documentation'!
   355 !MessageSend class methodsFor:'documentation'!
   307 
   356 
   308 version
   357 version
   309     ^ '$Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.24 2012-08-03 15:53:30 stefan Exp $'
   358     ^ '$Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.26 2015-03-27 11:21:29 cg Exp $'
   310 !
   359 !
   311 
   360 
   312 version_CVS
   361 version_CVS
   313     ^ '$Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.24 2012-08-03 15:53:30 stefan Exp $'
   362     ^ '$Header: /cvs/stx/stx/libbasic/MessageSend.st,v 1.26 2015-03-27 11:21:29 cg Exp $'
   314 ! !
   363 ! !
       
   364