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: problems with android: couldn't find static field


On Tue, Nov 9, 2010 at 2:08 PM, Peter Feigl <peter.feigl@jku.at> wrote:
> My scheme file is:
>
> (require 'android-defs)
> (activity at.nexoid.HelloScheme
>          (on-create-view
>           (let ((tv (android.widget.TextView (this))))
>             (tv:setText "foo"))))
>

Looking at your code I can see that the first expression for the
on-create-view is not evaluating to a "tv" object. The let expression
has to evaluate to an android.view.View Object. So change your code to
(require 'android-defs)
(activity at.nexoid.HelloScheme
 (on-create-view
   (let ((tv (android.widget.TextView (this))))
        (tv:setText "foo")
       tv)))

Also have a look at the latest example here which is much simpler.
http://per.bothner.com/blog/2010/AndroidHelloScheme/


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