[plt-scheme] Difference between 'send' and 'send' in an eval?

From: Sarino Suon (ssuon at polaris.umuc.edu)
Date: Wed Apr 23 22:01:05 EDT 2003

Hi, all:

Why does "(send obj method)" within an eval fail when it works fine
outside of it, though they refer to the same object?

I'm guessing that the two environments have different transformer
environments. Is this right? If so, how do I make the namespace's
transformer environment the same as that outside of it?

==========

Here's my code:

(define ns (make-namespace 'initial))

(define obj (make-object base%))

;; I create a similar symbol within the namespace

(parameterize ((current-namespace ns))
  (namespace-set-variable-value! 'obj obj)
  )


;; This eval complains that the target is not the correct
;; object when in fact it is.

(parameterize ((current-namespace ns))
  (eval '(send obj printme)))


Can anyone help?

Thank you.





Posted on the users mailing list.