public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* Problems with old kawa android code
@ 2020-12-07 21:28 Peter
  2020-12-08  1:22 ` Per Bothner
  0 siblings, 1 reply; 3+ messages in thread
From: Peter @ 2020-12-07 21:28 UTC (permalink / raw)
  To: kawa mailing list

Hello!

I have a bunch of old apps, that used to compile fine with kawa ~2.

Now I'm running into many problems :-/ One of them is as follows:

Code (foo.scm):

(require 'android-defs)
(define (bar (context :: android.content.Context))
  (let ((layout (android.widget.LinearLayout context)))
    layout))

Compile with:
CLASSPATH=/~/src/android/kawa/kawa.jar:/opt/android-sdk/platforms/android-14/android.jar java kawa.repl -d bin/classes -P at.nexoid. --module-static-run --warn-undefined-variable --warn-unknown-member --warn-invoke-unknown-method -C foo.scm

Output:
foo.scm:3:17: warning - type android.app.Activity is incompatible with required type android.view.View
foo.scm:3:46: warning - type android.content.Context is incompatible with required type android.view.View

I don't understand either of these.. The single parameter to the
constructor on line 3 (android.widget.LinearLayout) is a Context, as it
should be.. why does kawa want a *View* here?

Also, where does the Activity come from at all? I don't mention it
anywhere, why does kawa *want* an Activity here?

Thanks for any help with this :-/

Greetings, Peter

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-08  9:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-07 21:28 Problems with old kawa android code Peter
2020-12-08  1:22 ` Per Bothner
2020-12-08  9:10   ` Peter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).