| source method | targetClass := Object. source := 'm0 ^ 42' . method := targetClass compiler compile: source inClass: targetClass ifFail: [: err | self errorMessage: err ]. method setSource: source. targetClass addCompiledMethod: method. (Object >> #m0) sourceString.
Did I miss something?
Cheers,
Hernán
| source method |
targetClass := Object.
source := 'm0 ^ 42' .
GRPlatform current
compile: source
into: targetClass
classified: #foo
| source method |
targetClass := Object.
source := 'm1 ^ 42' .
targetClass
compile: source
notifying: Transcript
ifNewAddTo: targetClass controller
categorizeIn: (Array with: #foo asString)
--Mariano Martinez Peck
Software Engineer, Instantiations Inc.
--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to va-smalltalk...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibGBUiVeR90xzhbwsH6xfFB3j9kS3DvFCXd9PUPadCLW9w%40mail.gmail.com.