This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: JavaFX Example
- From: Matthieu Vachon <matthieu dot o dot vachon at gmail dot com>
- To: Per Bothner <per at bothner dot com>
- Cc: Tony West <tonys-mailbox at hotmail dot com>, "kawa at sourceware dot org" <kawa at sourceware dot org>
- Date: Wed, 6 Nov 2013 15:30:10 -0500
- Subject: Re: JavaFX Example
- Authentication-results: sourceware.org; auth=none
- References: <BAY177-W37A834584E2CC2DA1E4E54E1F00 at phx dot gbl> <527A96B2 dot 4000604 at bothner dot com> <CAOTvmon-t6Hk+jxJAobU=50LU1FV5MnNNb+nNx32oHX=mPCZGg at mail dot gmail dot com> <CAOTvmomBsBuF1+LtCcV6VCrrfDTXDurVjmShZWH0uJoiSXXKXA at mail dot gmail dot com> <527AA138 dot 8070709 at bothner dot com> <527AA3B6 dot 50300 at bothner dot com>
On Wed, Nov 6, 2013 at 3:16 PM, Per Bothner <per@bothner.com> wrote:
>When I compile your example I get:
>
>/home/bothner/tmp/hello-world.scm:10:9: warning - no use of start
>/home/bothner/tmp/hello-world.scm:24:9: warning - no use of create-button
>
>This because when you compile with main, then functions are not implicitly
>exported. This allows better optimization. In this case start is
>optimized away, which is why you get the AbstractMethodError.
I thought it made no difference of having a main or not. I was under
the impression that not providing `module-export` ensured that all
function were exported explicitly.
In fact, I thought it was false-positives from Kawa unsed dectection mechanisms.
>
>I think this should be viewed as a Kawa bug, when the function overrides an
>inherited method, it should be viewed as being "used".
I agree
>
>(module-static #t) would make the methods static, which would not work.
>Unsure why you don't get the AbstractMethodError.
>
>I'm having some configuration issues; more later. You could
>try removing the
> (module-compile-options main: #t)
If there is no main method generated, then I guess the script would
need to be called from another file right?
>I did have to change:
>(define (create-button #!key (text #f) (event-handler #f)) :: <Button>
>to:
>(define (create-button #!key (text #f) (event-handler #f)) :: <javafx.scene.control.Button>
My initial version used aliases which I changed afterward, seems I
forgot this one.
Matt