From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125049 invoked by alias); 13 May 2017 12:58:14 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 125036 invoked by uid 89); 13 May 2017 12:58:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.4 required=5.0 tests=BAYES_40,KAM_COUK,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*r:smtp, UD:build, scene, Button X-HELO: avasout07.plus.net Received: from avasout07.plus.net (HELO avasout07.plus.net) (84.93.230.235) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 13 May 2017 12:58:11 +0000 Received: from bother.homenet ([95.146.110.234]) by avasout07 with smtp id KoyA1v00553UrwF01oyByT; Sat, 13 May 2017 13:58:11 +0100 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.2 cv=HP2zLslv c=1 sm=1 tr=0 a=7WUQkX1/pq/7ijAIbP9tNQ==:117 a=7WUQkX1/pq/7ijAIbP9tNQ==:17 a=kj9zAlcOel0A:10 a=xqWC_Br6kY4A:10 a=tJ8p9aeEuA8A:10 a=mDV3o1hIAAAA:8 a=TJIyCKqheTxAtXnryUEA:9 a=CjuIK1q_8ugA:10 a=evY6hTnsP-4A:10 a=AYR_nEl5p1wA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-AUTH: cvine@:2500 Received: from bother.homenet (localhost [IPv6:::1]) by bother.homenet (Postfix) with ESMTP id BDA702601A4 for ; Sat, 13 May 2017 13:58:09 +0100 (BST) Date: Sat, 13 May 2017 12:58:00 -0000 From: Chris Vine To: Kawa mailing list Subject: javafx Message-ID: <20170513135809.48e591f2@bother.homenet> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2017-q2/txt/msg00058.txt.bz2 There seems to be a problem with the 'javafx-scene' macro in kawa-2.4. First, the example at https://www.gnu.org/software/kawa/Building-JavaFX-applications.html#idm139760384873792 fails to size the button correctly when compared with kawa-2.1.9. The same occurs with kawa-2.3 (I have not tested with kawa-2.2). Curiously, taking this more complex example: ***************** (require 'javafx-defs) (javafx-application) (javafx-scene title: "Hello Button" width: 600 height: 450 (Button text: "Click Me" layout-x: 25 layout-y: 40 on-action: (lambda (e) (format #t "Event: ~s~%~!" e))) (Button text: "Click Me 2" layout-x: 25 layout-y: 70 on-action: (lambda (e) (format #t "Event: ~s~%~!" e))) (Button text: "Click Me 3" layout-x: 25 layout-y: 100 on-action: (lambda (e) (format #t "Event: ~s~%~!" e)))) ***************** kawa-2.3 works correctly (the buttons are correctly sized), whereas kawa-2.4 fails to run the code, with this error: Exception in Application start method java.lang.RuntimeException: Exception in Application start method at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$156(LauncherImpl.java:182) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to javafx.scene.Node at gnu.kawa.javafx.MakeScene.build(MakeScene.scm:54) at javafx-test2.run(javafx-test2.kawa:10008) at gnu.kawa.javafx.KawaJavafxApplication.start(defs.scm:65) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$163(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$176(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$174(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$175(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$50(GtkApplication.java:139) ... 1 more If you avoid the javafx-scene macro, and set up the scene by hand, all seems to work fine with any kawa-2 version. Chris