Re: JavaFX2, problem with overriden constructor

2012-12-01 Thread Christian Sperandio
I feel shame.
I didn't think try this solution.

Thanks.


2012/12/1 Sean Corfield 

> On Sat, Dec 1, 2012 at 11:58 AM, Christian Sperandio <
> christian.speran...@gmail.com> wrote:
>
>> When I try to use the following constructor 
>> *Scene
>> *(Parent  root,
>> double width, double height, 
>> Paint
>>  fill)
>> ...
>> I call the constructor like this:  scene (Scene. root 500 250 Color/BLACK)
>> I don't have any error if I do:
>> (let [ scene (Scene. root 500 250)]
>>   (.setFill scene Color/BLACK))
>>
>
> Try: (Scene. root 500.0 250.0 Color/BLACK)
> --
> Sean A Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
> World Singles, LLC. -- http://worldsingles.com/
>
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: JavaFX2, problem with overriden constructor

2012-12-01 Thread Sean Corfield
On Sat, Dec 1, 2012 at 11:58 AM, Christian Sperandio <
christian.speran...@gmail.com> wrote:

> When I try to use the following constructor 
> *Scene
> *(Parent  root,
> double width, double height, 
> Paint
>  fill)
> ...
> I call the constructor like this:  scene (Scene. root 500 250 Color/BLACK)
> I don't have any error if I do:
> (let [ scene (Scene. root 500 250)]
>   (.setFill scene Color/BLACK))
>

Try: (Scene. root 500.0 250.0 Color/BLACK)
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

JavaFX2, problem with overriden constructor

2012-12-01 Thread Christian Sperandio
Hi,

I continue learning JafaFX with Clojure and I've got an issue with the 
Scene constructor.
When I try to use the following constructor 
*Scene*(Parent
 root, 
double width, double height, 
Paint
 fill)
I get an error when launching:
Exception in Application start method
Exception in thread "main" java.lang.RuntimeException: Exception in 
Application start method
at 
com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:403)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.IllegalArgumentException: No matching ctor found for 
class javafx.scene.Scene
at clojure.lang.Reflector.invokeConstructor(Reflector.java:183)
at testjavafx2clj.core$newScene.invoke(core.clj:21)
at testjavafx2clj.core$_start.invoke(core.clj:36)
at testjavafx2clj.core.start(Unknown Source)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:206)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
at 
com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication$3$1.run(GtkApplication.java:82)


I call the constructor like this:  scene (Scene. root 500 250 Color/BLACK)
I don't have any error if I do:
(let [ scene (Scene. root 500 250)]
  (.setFill scene Color/BLACK))

I think the problem comes from the Scene's constructor has 2 constructors 
with the same arity. I try to solve that using hints (like  scene (Scene. 
root 500 250 #^javafx.scene.paint.Color Color/BLACK) but it doesn't work 
too.
Does it exist a solution? Or, must I use the 2 args constructor with 
setFill method call?

Thanks.


-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en