adding messages dinamically to a single instance object
Hi all. I need to know how can i do if i want add new behaviour ( a new method ) to a single instance object of a class. It means not to add new selector to the class but i want a single instance responds that mesage. Where can i read about it? Tia Ing. Pablo Digonzelli Software Solutions IP-Solutiones SRL Dividato SA 25 de Mayo 521 San Miguel de Tucumán Email: pdigonzelli@softsargentina.com pdigonzelli@gmail.com Cel: 5493815982714
Hi. Look at project Talents https://github.com/tesonep/pharo-talents. Idea is to implement behaviour (also with state) in normal way with classes and then dynamically install it to any existing objects 2017-03-03 14:07 GMT+01:00 Pablo R. Digonzelli <pdigonzelli@gmail.com>:
Hi all. I need to know how can i do if i want add new behaviour ( a new method ) to a single instance object of a class. It means not to add new selector to the class but i want a single instance responds that mesage. Where can i read about it? Tia
------------------------------ *Ing. Pablo Digonzelli* Software Solutions IP-Solutiones SRL Dividato SA 25 de Mayo 521 San Miguel de Tucumán Email: pdigonzelli@softsargentina.com pdigonzelli@gmail.com Cel: 5493815982714
Hola Pablo, This technique is not something new, it was reported at least +20 years ago. You can read about it in a SO answer I wrote; http://stackoverflow.com/a/14202534 where there is a link to a foundational paper. Let us know what are you trying to do. Cheers, Hernán 2017-03-03 10:07 GMT-03:00 Pablo R. Digonzelli <pdigonzelli@gmail.com>:
Hi all. I need to know how can i do if i want add new behaviour ( a new method ) to a single instance object of a class. It means not to add new selector to the class but i want a single instance responds that mesage. Where can i read about it? Tia
------------------------------ *Ing. Pablo Digonzelli* Software Solutions IP-Solutiones SRL Dividato SA 25 de Mayo 521 San Miguel de Tucumán Email: pdigonzelli@softsargentina.com pdigonzelli@gmail.com Cel: 5493815982714
participants (3)
-
Denis Kudriashov -
Hernán Morales Durand -
Pablo R. Digonzelli