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

From: Katsmall the Wise (kela_bit at netvision.net.il)
Date: Mon Apr 28 13:42:19 EDT 2003

Try

(parameterize ([current-namespace (make-namespace 'initial)])
  (eval `(define obj ,obj))
  (eval `(send obj printme))).

Does this work for you?

Katsmall the Wise

Sarino Suon wrote:

>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>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.