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 09, 2010 at 03:11:57PM +0530, Santosh Rajan wrote:
> 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/
> 

Thanks for the swift answer, I never found that blog post (nor your own blog posts) when googling.
This makes things much simpler ;)
I've been trying to create macros and code that allow me to create an android list based on two functions, 
one that returns the data, and one that creates the views. For this, I tried to subclass ArrayAdapter, but 
then I found I had to store the view creation function in the class. How can I declare a member field in a 
java class that has a type that allows me to store arbitrary functions? What is the correct type: to use?

I think kawa would be a *great* development environment for android, if we could provide a bunch of helpers 
(for creating projects, correctly modifying build.xml etc.) and a few macros.

Thanks!

Peter

Attachment: pgp00000.pgp
Description: PGP signature


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