bugKawa - Bugs: bug #22451, Access to variables in environment...

 
 

bug #22451: Access to variables in environment from compiled code

Submitter:  None
Submitted:  Sat 01 Mar 2008 05:40:58 PM UTC
   
 
Category:  Code generation Severity:  3 - Normal
Item Group:  Unexpected result Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 23 Mar 2008 08:14:17 PM UTC, comment #1: 

I'm not sure what's going on - a complete setlf-contains test program would help.

One suspicious thing is
new Scheme().getnewEnvironment()'- that shouldn't be needed: If you do 'new Scheme()' that automatically calls getNewEnvironment().  So 'new Scheme().getEnvironment()'  makes more sense.

A high-priority item on my TODO list cleaning up and documenting better the Scheme-from-Java API, and in a way compatible with javax.script.

Per Bothner <bothner>
Group administrator
Sat 01 Mar 2008 05:40:58 PM UTC, original submission:  

A location set in an environment from Java is not accessed from compiled code or scripts (or not always!), only its first binding.

Example:

Environment env = new Scheme().getnewEnvironment();

env.put("self",b1);

Scheme.eval("(define (getInternalInfluence)
(invoke (as <mimosa.scheduler.DefaultState> self) 'getInternalInfluence))",env);
==> call of the function use b1 as the value of self, OK

env.put("self",b2);
==> call of the function STILL USE b1
I replaced self by (eval 'self (interaction-environment)) and it works (but it is just a work-around!!)

Unfortunately, it is always like that!! When I use a script referencing a location set differently in different environments, only the first binding is used...very bad for what I have to do

HELP PLEASE





Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bothner (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code