I tried the following example code from ESUG2003 slides: | object method source engine | object := STScriptObject scriptObject. engine := STEngine engineForLanguageWithName:'Smalltalk'.
source := 'sayHi Transcript show: \'Hi.\'. ^self'.
method := engine methodFromSource:source
forReceiver:object
inEnvironment:Environment.object addMethod:method. object sayHi.
with stexec and I receive the error:
"stexec: Uncaught exception STInterpreterGenericException, reason: No execution environment set"
I can get the method to execute 'manually' by using "executeMethod:forReceiver:withArguments:inEnvironment:".
Why can't I get it to work as written?
Thanks,
Matt
_______________________________________________ Help-gnustep mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gnustep
