Re: Newb question about calling Scheme from Java

"Scott G. Miller" <[email protected]> Tue, 2 Sep 2008 16:12:58 -0500
Newsgroups gmane.comp.java.sisc.user
Message-ID <[email protected]>
On Tue, Sep 2, 2008 at 2:15 PM, Mike J. Bell <[email protected]> wrote:

>
> Context.execute(appContext, new SchemeCaller() {
>     public Object execute(Interpreter interpreter) throws SchemeException {
>         Symbol symbol = new Symbol("foobar");
>         Value value = SchemeBoolean.TRUE;
>         Symbol context = new Symbol("r5rs");
>
>         interpreter.define(symbol, value, context);
>         interpreter.eval("...my scheme code...");
> ...
>
Not sure this is your problem, but you want Symbol.get("foobar"), not
new Symbol.  If you don't do this, the resulting Symbol is distinct
from any other in SISC, and won't match ordinary symbols in Scheme.

Scott

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/