[Newbies] Feedback: Using Output as the Next Input
Dan
dnorton at mindspring.com
Fri Dec 5 16:22:17 UTC 2014
> > > On 05.12.2014, at 00:49, Dan <dnorton at mindspring.com> wrote:
>>> I'm interested in how to dynamically compile a class method.
It's easy (Thanks, Stephane):
You can invoke directly the compiler
for example in Pharo (there is a nice pharo-user mailing-list)
you can do
MyClass compile: `myMethod ^ 42´
and you method is compiled and added to the class.
You can also create a class doing
Compiler evaluate: 'Object subclass: #Box2
instanceVariableNames: ''height width''
classVariableNames: ''''
category: ''AABox´''
- Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20141205/29303c16/attachment.htm
More information about the Beginners
mailing list