From: Per Bothner <per@bothner.com>
To: Alcides Flores Pineda <alcides.fp@gmail.com>,
Kawa Mailing List <kawa@sourceware.org>
Subject: Re: define-alias NOT working
Date: Sun, 05 Apr 2015 02:16:00 -0000 [thread overview]
Message-ID: <55209AD5.3050604@bothner.com> (raw)
In-Reply-To: <552069DD.5010409@gmail.com>
On 04/04/2015 03:46 PM, Alcides Flores Pineda wrote:
> (define-alias showMsgDlg javax.swing.JOptionPane:showMessageDialog)
>
> (showMsgDlg #!null "Hello everybody from Kawa!")
>
>
> That used to work pretty well in Kawa 1.14, is now broken..
>
> $ java -cp kawa-2.0.1.jar kawa.repl
> #|kawa:1|# (define-alias showMsgDlg javax.swing.JOptionPane:showMessageDialog)
> java.lang.NullPointerException
> at kawa.standard.location.rewriteApply(location.java:96)
I checked in a fix for this.
By the way: Kawa isn't able to resolve the call to showMsgDlg to a specific method,
so it ends up doing runtime reflection. It would be nice to fix this,
but as an alternative you might consider using a macro:
(define-syntax showMsgDlg
(syntax-rules ()
((_ . args)
(javax.swing.JOptionPane:showMessageDialog . args))))
--
--Per Bothner
per@bothner.com http://per.bothner.com/
prev parent reply other threads:[~2015-04-05 2:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-04 22:46 Alcides Flores Pineda
2015-04-05 2:16 ` Per Bothner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55209AD5.3050604@bothner.com \
--to=per@bothner.com \
--cc=alcides.fp@gmail.com \
--cc=kawa@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).