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]

Android Resources


Hey,

With a bit of futzing around I was able to get a hello world application
working with Android 1.5, but I'm running into an issue with using the
autogenerated resource class. I changed the classpath to 

  ${external-libs-folder}/kawa.jar:${android-jar}:${out-classes}

and this /seemed/ to pick up the definition of R from R.class, but when
I tried:

  (define-simple-class KawaHello (android.app.Activity)
    ((onCreate (sIS :: android.os.Bundle)) :: void
       (invoke-special android.app.Activity (this) 'onCreate sIS)
       ((this):setContentView R:.layout:.main)))

It built with a few warnings and then proceeded to crash and burn. I
tried replacing R:... with:

  (static-field (static-field R 'layout) 'main)

And got:

    [kawa] ...  no slot `layout' in kawa.android.hello.R
    [kawa] ... warning - more than one possibly applicable method
     'setContentView' in kawa.android.hello.KawaHello

I'm guessing that there is some magic I am missing wrt accessing inner
classes perhaps? I've never written any Java (it seems straightforward
given that I still know distressingly too much C++...) and so I am
drawing a complete blank here.

Otherwise, thanks much for the android target; if I manually create
Views everything works nicely and I have Scheme on my phone!

-- 
clinton: last time I was a bit weak (*sniff* level four and only 18 hp)
clinton: I had a -1 intelligence modifier for the first three weeks
emacsen: what about your character?


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