Howto add a method programatically
Hi list, I'm using Pharo 1.2.1. How can I add a method programatically (with code)? Where do I find information about it? Thanks in advance!
On 29 June 2011 18:44, Alex Schenkman <alex@schenkman.info> wrote:
Hi list, I'm using Pharo 1.2.1. How can I add a method programatically (with code)? Where do I find information about it? Thanks in advance!
MyClass compile: 'newMethod ^ 1 + 1 ' -- Best regards, Igor Stasenko AKA sig.
On Wed, Jun 29, 2011 at 7:04 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 29 June 2011 18:44, Alex Schenkman <alex@schenkman.info> wrote:
Hi list, I'm using Pharo 1.2.1. How can I add a method programatically (with code)? Where do I find information about it? Thanks in advance!
MyClass compile: 'newMethod ^ 1 + 1 '
yes, and you can also check the friends of #compile: that are in the same category. You can specify notifiers, category, etc, etc.
-- Best regards, Igor Stasenko AKA sig.
-- Mariano http://marianopeck.wordpress.com
the compileSilently: will not log your changes if you need that. On Jun 29, 2011, at 8:01 PM, Mariano Martinez Peck wrote:
On Wed, Jun 29, 2011 at 7:04 PM, Igor Stasenko <siguctua@gmail.com> wrote: On 29 June 2011 18:44, Alex Schenkman <alex@schenkman.info> wrote:
Hi list, I'm using Pharo 1.2.1. How can I add a method programatically (with code)? Where do I find information about it? Thanks in advance!
MyClass compile: 'newMethod ^ 1 + 1 '
yes, and you can also check the friends of #compile: that are in the same category. You can specify notifiers, category, etc, etc.
-- Best regards, Igor Stasenko AKA sig.
-- Mariano http://marianopeck.wordpress.com
participants (4)
-
Alex Schenkman -
Igor Stasenko -
Mariano Martinez Peck -
Stéphane Ducasse