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]

Re: Android Resources


Clinton Ebadi <clinton@unknownlamer.org> writes:

> I tarred up the project @
> http://unknownlamer.org/files/temp/kawa-hello.tar.gz. Any ideas?
>
> Semirelated, is there a way to create an anonymous class that implements
> an interface? I decided to play around a bit and manually create a
> layout, and wanted to set the onclick method of a button but:
>
> (evalb:setOnClickListener
>         (let ((eval-expr (lambda () (tv:setText (ed:getText)))))
>           (object (android.view.View.OnClickListener)
>                   ((onClick (v :: android.view.View)) :: void
>                    (eval-expr)))))
>
> fails with an invalid superclass error; if I remove the superclass then
> it builds but crashes (accursed java and one method anonymous
> classes...).

Being utterly unfamiliar with Java, I'm terribly sorry I asked a kind of
dumb question; I spent a few hours poking around and decompiled various
things and realized that I had to use android.view.View$OnClickListener
(likewise for R$layout). Figures that nested classes are nothing but
syntactic sugar.

-- 
<captain_krunk> ntk is currently using "telnet fyodor 25" to send email


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