This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
A seemingly simple problem with methods and Android
- From: Colin Gan <gan dot colin dot e at gmail dot com>
- To: kawa at sourceware dot org
- Date: Wed, 13 Jul 2011 22:32:36 +0800
- Subject: A seemingly simple problem with methods and Android
Hello all,
I am trying to use the below:
(require 'android-defs)
(define-simple-class <RobotCanvas> (android.view.View))
(activity KawaActivity
(on-create-view
(RobotCanvas (this)
)))
And the Kawa compiler spits out the bug:
scompile:
[java] (compiling C:\Users\nilocnag\Dropbox\Projects\kawadroid\src\org\coli
g\kawadroid\KawaActivity.scm to kawa.android.KawaActivity)
[java] C:\Users\nilocnag\Dropbox\Projects\kawadroid\src\org\colig\kawadroid
\KawaActivity.scm:4:1: more than one possibly applicable method 'setContentView'
in kawa.android.KawaActivity
[java] candidate: void kawa.android.KawaActivity.setContentView(android.v
iew.View)
[java] candidate: void kawa.android.KawaActivity.setContentView(int)
BUILD FAILED
C:\Users\nilocnag\Dropbox\Projects\kawadroid\build.xml:84: Java returned: -1
Total time: 2 seconds
C:\Users\nilocnag\Dropbox\Projects\kawadroid>
The script is based off the example provided in Per's blog, which does
build properly for me. I'm not quite sure how to tell the compiler to
specifically use the setContentView method that accepts Views.
Regards,
Colin