discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

StepTalk and object construction.


From: Matthew D Swank
Subject: StepTalk and object construction.
Date: Fri, 11 Feb 2005 08:04:25 -0600
User-agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)

I originally posted this to gnu.gnustep.help; however this list seems to
get a bit more traffic.
------------------------------------------------------------
(Note I am using cvs -q -d
":ext:anoncvs@savannah.gnu.org:/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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]