This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Android REPL - add* syntax-sugar not available in constructor
Per Bothner wrote:
>
> On 01/31/2012 06:55 PM, teyc wrote:
>>
>>
>> Per Bothner wrote:
>>>
>>> However, it should be doable to use java.lang.reflect.Proxy, as long as
>>> the
>>> requested type is an interface (rather than an abstract class). The
>>> idea would be to write a utility class ProcedureInvocationHandler that
>>> implements
>>> InvocationHandler by calling applyN on the procedure.
>>>
>>
>> That did the trick, and I now have the following working. It reads like
>> Java
>> :(
>
> That's an improvement, but I was thinking the compiler would generate the
> Proxy automatically. And so I want ahead and implemented that ...
>
> I'm hoping this might now work:
>
> (*activity*:runOnUiThread
> (lambda ()
> (let
> ((button (Button *activity*
> text: "Push Me"
> on-click-listener: (lambda (v) ...))))
> (*activity*:setContentView button))))
>
> Please try it.
>
> You might find these articles provide ideas:
>
> http://per.bothner.com/blog/2011/JavaFX-using-Kawa-intro/
> http://per.bothner.com/blog/2011/JavaFX-using-Kawa-animation/
>
> These are for JavaFX 2.0, not Android, but using Kawa in similar ways.
> --
> --Per Bothner
> per@bothner.com http://per.bothner.com/
>
>
Works on Java, doesn't work on Dalvik.
(define x (kawa.android.SomeWidget some-listener: (lambda (x) (display x)))
/dev/stdin:9:52: this expression must be compiled, but compiler is
unavailable
I'll try to revert back to using switches for alwaysCompile etc and see if I
could reproduce the issue on Java, as it is a pain to debug/troubleshoot on
Android. (Perhaps I might be able to fire up the debugger on Eclipse)
--
View this message in context: http://old.nabble.com/Android-REPL---add*-syntax-sugar-not-available-in-constructor-tp33222365p33242482.html
Sent from the Sourceware - kawa list mailing list archive at Nabble.com.