But why do you want that? Why do you want to code everything in the playground?

Le 1/10/16 à 21:58, CodeDmitry a écrit :
Thanks Peter! I admit I couldnt really dynamically add methods to a class at
runtime since I was doing it as follows:

([
     (LOCell class) methodDict
         at: #mouseAction
         put: ((LOCell class) compile:
             mouseAction: a
                 ^ mouseAction := a
         ).
] value).

Which caused constant harassment by Pharo until I typed:

(LOCell class) removeAllKeys.

or

(LOCell class) removeKey: #mouseAction.

I'll try your method in a bit to see if it works better.

But you are using black magic incantation instead of using the class browser
So do not complain if you shoot in your feet in the future.

I would not code like that because you will just get frustrated and you will think pharo is bad while we are all using hyper fast and safe and we keep black magic
for the place we want it.

Stef





--
View this message in context: 
http://forum.world.st/New-to-Pharo-a-bunch-of-questions-tp4917701p4917706.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.




Reply via email to