Certainly you can do that, although there is no support for this in the
browser or in the compiler. I just tried it, it works.
Here comes the cookbook:
1. Define the method you desire with a regular name e.g. testSpace in your
2. Execute the following statement:
Test4Space methodDictionary at: #'test space' put: (Test4Space
methodDictionary at: #testSpace)
3. Execute the following statement:
Test4Space new perform: #'test space'
Test4Space new perform: 'test space' asSymbol
Certainly you cannot fileout Test4Space class and expect to get the strange
method back, you cannot see the strange method in a browser, you cannot
publish the strange method, and you probably cannot parcel out the strange
method name. But you can certainly reconstruct the behaviour using the same
trick after loading.
But: Why do you need it?
Von: Mark Pirogovsky [mailto:[hidden email]]
Gesendet: Dienstag, 24. Januar 2006 20:49
An: [hidden email] Betreff: message name with the spaces ?
Hello all !
is it possible to create the message with the space imbedded in the
something along the lines
the reason I want to do that is -- to be able to use the following
I just read Georg Heeg's response, and my response is still "no!"
So just create a method called
str := aString collect: [:c | c isLetter | c isDigit ifTrue:
[c] ifFalse: [$_].
^self perform: str asSymbol
Now make your method
Mark Pirogovsky wrote:
> Hello all !
> is it possible to create the message with the space imbedded in the
> selector ?
> something along the lines
> field stream
> ^self fieldStream
> the reason I want to do that is -- to be able to use the following
> anObject perform:'field stream'asSymbol