Mark,
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
class Test4Space.
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'
Or
Test4Space new perform: 'test space' asSymbol
It works.
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?
Georg
-----Ursprüngliche Nachricht-----
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
selector ?
something along the lines
field stream
^self fieldStream
the reason I want to do that is -- to be able to use the following
construct:
anObject perform:'field stream'asSymbol
--Mark