Shortcut for programmatically executing a class side method ?
Hi, Does there exist a shortcut for programmatically executing a class side method ? For example, String class>>#loremIpsum in: [ :method | method methodClass instanceSide perform: method selector ]. I was looking for a shortcut, like #eval, #execute, #value or something like that. (String class>>#loremIpsum) eval. Sven
Normally, primitive 188 and 189 execute a method (the receiver is the method receiver). Maybe search for senders... Le dim. 13 janv. 2019 à 22:42, Sven Van Caekenberghe <sven@stfx.eu> a écrit :
Hi,
Does there exist a shortcut for programmatically executing a class side method ?
For example,
String class>>#loremIpsum in: [ :method | method methodClass instanceSide perform: method selector ].
I was looking for a shortcut, like #eval, #execute, #value or something like that.
(String class>>#loremIpsum) eval.
Sven
String perform: #method On Sun, Jan 13, 2019, 18:42 Sven Van Caekenberghe <sven@stfx.eu wrote:
Hi,
Does there exist a shortcut for programmatically executing a class side method ?
For example,
String class>>#loremIpsum in: [ :method | method methodClass instanceSide perform: method selector ].
I was looking for a shortcut, like #eval, #execute, #value or something like that.
(String class>>#loremIpsum) eval.
Sven
participants (3)
-
Gabriel Cotelli -
Nicolas Cellier -
Sven Van Caekenberghe