This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

scoping rules


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]