StepTalk and object construction.

Matthew D Swank <[email protected]>
Newsgroups gmane.comp.lib.gnustep.user
Message-ID <[email protected]>
(Note I am using cvs -q -d 
":ext:[email protected]:/cvsroot/gnustep" update -dP -D 20041203 
gnustep/dev-libs/StepTalk)

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.