From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14135 invoked by alias); 1 Nov 2018 13:45:03 -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 13205 invoked by uid 89); 1 Nov 2018 13:45:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=7-9, rnd, H*c:alternative X-HELO: mail-it1-f179.google.com Received: from mail-it1-f179.google.com (HELO mail-it1-f179.google.com) (209.85.166.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 01 Nov 2018 13:45:00 +0000 Received: by mail-it1-f179.google.com with SMTP id p64-v6so2068608itp.0 for ; Thu, 01 Nov 2018 06:45:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=asA9O38hhbV2u9W2ncvNjXVGNiA1Kia6bgVoKcwc3H8=; b=C10w6xgxzLCa2wS+nIcjmbXHv/0Ve0uDywLwV391jxgrvfaG4gwBCpRi9ABLqeYM6q zSBAxvQHsgvqtpKGLvmZglBRZNpejCm3wNy+gYI2yKgQ8up3si1SvIaTK2C2Zh4b4MBA gMBXOrTpoAKzqGvv5Km7DkioCDeZLH/wgHEw09sm+nX3b9u+VKwaLEZk8SzNc5uZ+j/f YeWlsCXnfgHkibEb0vegYJKXeUz33McK+64OuBML+ErHBl+/fnOYD4WK8hKc1SIojRxG ofDEJFT34NxSr4ZVXPqV1n82BE2Zto7inLr+4f/GVzTLUS1G5BrNbdDS7ozF/Hm7dYaD QWQQ== MIME-Version: 1.0 From: Arie van Wingerden Date: Thu, 01 Nov 2018 13:45:00 -0000 Message-ID: Subject: Need some help with Java - Kawa interop To: kawa@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-q4/txt/msg00022.txt.bz2 Trying to generate a random color for a shape in JavaFX. This (lines 7-9 are the binding of r, g and b): > (define (randomColor) (let ( (rnd (java.lang.Math:random)) (r (java.util.Random:nextInt 255)) (g (java.util.Random:nextInt 255)) (b (java.util.Random:nextInt 255))) (Color:rgb r g b))) Generates warnings: .\test.scm:7:34: warning - type integer is incompatible with required type java.util.Random .\test.scm:8:34: warning - type integer is incompatible with required type java.util.Random .\test.scm:9:34: warning - type integer is incompatible with required type java.util.Random .\test.scm:7:8: warning - cannot convert literal (of type gnu.math.IntNum) to ClassType java.util.Random .\test.scm:8:8: warning - cannot convert literal (of type gnu.math.IntNum) to ClassType java.util.Random .\test.scm:9:8: warning - cannot convert literal (of type gnu.math.IntNum) to ClassType java.util.Random What am I doing wrong? TIA