Adding method slots dynamically

baltasarq jbgarcia at uvigo.es
Sun Aug 14 21:57:45 UTC 2005


Hi, there !

--- In self-interest at yahoogroups.com, Jecel Assumpcao Jr 
<jecel at m...> wrote:
> First you need a mirror on the object you are interested in:
> You can create a mirror on a method from a string:
> 
>   (reflect: myObj) at: 'selector:And:' PutContents:
>     ('| :arg1. :arg2. tmp <- 9 | (arg1*arg2)+tmp' parseObjectBody)

I don't understand why you need a mirror object in order to 
add/delete/modify(?) methods or attributes (I suppose you need the 
same trick for attributes).

What's the role of the mirror, here ? Is it related to preformance ?

Thank you in advance,

Baltasar








More information about the Self-interest mailing list