This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
scoping rules
- From: Sonny To <son dot c dot to at gmail dot com>
- To: Kawa mailing list <kawa at sourceware dot org>
- Date: Sun, 17 Sep 2017 09:51:32 -0700
- Subject: scoping rules
- Authentication-results: sourceware.org; auth=none
sorry for the newb question but i find this behavior odd
(let ((handler (android.os.Handler (android.os.Looper:getMainLooper)))
(c context))
(handler:post (lambda ()
(let ((t (android.widget.Toast:makeText (as
android.app.Application c) "foobar" 1000)))
(t:show))
)))
To get this example to work I had to bind c context in the top level let
in the second let, I have to use c instead of context directly.
(android.widget.Toast:makeText (as android.app.Application context)
will complain
/dev/stdin:45:93: unbound location: context
it could not see the context binding.
Should it not look in the environment? context is definitely in the
environment because the c binding works