ScalaFX v.1.0 Milestone 3 Released

376 views
Skip to first unread message

Jarek Sacha

unread,
Apr 16, 2013, 10:50:19 PM4/16/13
to scalaf...@googlegroups.com, scala-a...@googlegroups.com, scala...@googlegroups.com
The third milestone of ScalaFX v.1.0 is now available on our Downloads page and in the Maven repository.

ScalaFX helps you simplify creation of JavaFX-based user interfaces in Scala. ScalaFX uses a simple, hierarchical pattern for creating new objects and building up the scene graph. ScalaFX supports full interoperability with Java and can run anywhere the Java Virtual Machine (JVM) and JavaFX2 are supported. Current version supports most of the JavaFX 2.2.7 functionality. For more information see ScalaFX home page.

Changes since Milestone 2
  • Improvements to handling of collections within ScalaFX code  For instance, utility functions added to help filling collections and deal with `null` passed from the user.
  • Improvements to scaladocs.
  • Missing methods added to `Scene`: `fill`, ` addMnemonic`, ` removeMnemonic`, ` getMnemonics`, ` accelerators`, ` snapshot`, ` startDragAndDrop`, ` startFullDrag`.
  • Additional `Font` factory methods.
  • Fixed Issue 39: scalafx.scene.control.Pagination PageFactory is not working
  • Fixed Issue 45: Missing wrappers for ReadOnly[Boolean,Double,Float,Integer,Long,String]Wrappers
  • Fixed Issue 57: `Control` should extend `Parent` not `Node`.
  • Work around for Scala 2.10 bug SI-7269 that was causing one of the test in ObservableMapSpec to fail. Please add your votes for the fix.
  • Added some factory methods for `ReadOnlyObjectWrapper` as a workaround for Issue 14.
  • Sbt-idea updated to v.1.3.0 for improved IDEA project generation.

A big thank you to all the contributors!
23 – Rafael Afonso
15 - Jarek Sacha
 1 - Alain Béarez

Eric Kolotyluk

unread,
Apr 18, 2013, 5:44:01 PM4/18/13
to scalaf...@googlegroups.com
Is there a Maven Archetype somewhere we can use with this?

Cheers, Eric


On 2013-04-16 7:50 PM, Jarek Sacha wrote:
The third milestone of ScalaFX v.1.0 is now available on our Downloads page and in the Maven repository.

ScalaFX helps you simplify creation of JavaFX-based user interfaces in Scala. ScalaFX uses a simple, hierarchical pattern for creating new objects and building up the scene graph. ScalaFX supports full interoperability with Java and can run anywhere the Java Virtual Machine (JVM) and JavaFX2 are supported. Current version supports most of the JavaFX 2.2.7 functionality. For more information see ScalaFX home page.

Changes since Milestone 2
  • Improvements to handling of collections within ScalaFX code� For instance, utility functions added to help filling collections and deal with `null` passed from the user.
  • Improvements to scaladocs.
  • Missing methods added to `Scene`: `fill`, ` addMnemonic`, ` removeMnemonic`, ` getMnemonics`, ` accelerators`, ` snapshot`, ` startDragAndDrop`, ` startFullDrag`.
  • Additional `Font` factory methods.
  • Fixed Issue 39: scalafx.scene.control.Pagination PageFactory is not working
  • Fixed Issue 45: Missing wrappers for ReadOnly[Boolean,Double,Float,Integer,Long,String]Wrappers
  • Fixed Issue 57: `Control` should extend `Parent` not `Node`.
  • Work around for Scala 2.10 bug SI-7269 that was causing one of the test in ObservableMapSpec to fail. Please add your votes for the fix.
  • Added some factory methods for `ReadOnlyObjectWrapper` as a workaround for Issue 14.
  • Sbt-idea updated to v.1.3.0 for improved IDEA project generation.

A big thank you to all the contributors!
23 � Rafael Afonso
15 - Jarek Sacha
�1 - Alain B�arez
--
You received this message because you are subscribed to the Google Groups "ScalaFX Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalafx-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
�
�

Brian Schlining

unread,
Apr 18, 2013, 5:50:42 PM4/18/13
to scalaf...@googlegroups.com

Is there a Maven Archetype somewhere we can use with this?

If not, here's a pom file to get you started at https://gist.github.com/hohonuuli/3940257 

It's getting a little old so you'll have to change a few of the dependency versions, but it should get you going.

-- 
Brian Schlining 

Eric Kolotyluk

unread,
Apr 18, 2013, 7:17:34 PM4/18/13
to scalaf...@googlegroups.com
Thanks for the reference, but reviewing 221 lines of POM just makes my eyes glaze over.

As much as I REALLY want to do stuff with ScalaFX, the onboarding cost is WAY too high. There STILL does not seem to be any simple way to just get going with ScalaFX in 5 minutes.

One of the things I have learned over decades of trying to sell innovation to people, is that people generally try what is easy to try, and give up on stuff that seems too hard.

I simply do not have more than 1 hour to spend fussing with ScalaFX. I am trying to follow http://code.google.com/p/scalafx/wiki/GettingStarted

Currently I am stuck with

Description    Resource    Path    Location    Type
bad symbolic reference. A signature in Stage.class refers to term javafx in package <root> which is not available. It may be completely missing from the current classpath, or the version on the classpath might be incompatible with the version used when compiling Stage.class.    client        Unknown    Scala Problem

Description    Resource    Path    Location    Type
bad symbolic reference. A signature in Stage.class refers to term stage in value javafx which is not available. It may be completely missing from the current classpath, or the version on the classpath might be incompatible with the version used when compiling Stage.class.    App.scala    /client/src/main/scala/net/kolotyluk/find_duplicate_files/client    line 21    Scala Problem

I am using the ScalaIDE from TypeSafe with

    <dependency>
        <groupId>org.scalafx</groupId>
        <artifactId>scalafx_2.10</artifactId>
        <version>1.0.0-M3</version>
    </dependency>

And have everything I can find set to the latest version of Java 7.

Cheers, Eric

Brian Schlining

unread,
Apr 18, 2013, 8:45:13 PM4/18/13
to scalaf...@googlegroups.com
On Thu, Apr 18, 2013 at 4:17 PM, Eric Kolotyluk <eric.ko...@gmail.com> wrote:
Thanks for the reference, but reviewing 221 lines of POM just makes my eyes glaze over.

Ummm ... you're welcome? 
 
--
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Brian Schlining
bschl...@gmail.com

Eric Kolotyluk

unread,
Apr 19, 2013, 2:12:52 AM4/19/13
to scalaf...@googlegroups.com
I did not mean to seem ungrateful, but I want this to be easy for everyone to do, not just me.

I really am grateful, and will probably look at it closer when I have more free time to spend.

Cheers, Eric

Alain FAGOT BÉAREZ

unread,
Apr 19, 2013, 2:45:19 AM4/19/13
to scalaf...@googlegroups.com
Em quinta-feira, 18 de abril de 2013 20h17min34s UTC-3, Eric Kolotyluk escreveu:
As much as I REALLY want to do stuff with ScalaFX, the onboarding cost is WAY too high. There STILL does not seem to be any simple way to just get going with ScalaFX in 5 minutes.ust give a try at 

Just give a try at GroovyFX or JavaFX itself... They might be simpler to board on.
 
I simply do not have more than 1 hour to spend fussing with ScalaFX. I am trying to follow http://code.google.com/p/scalafx/wiki/GettingStarted

Since the release of the recent milestones, this page is highly outdated. But I still did not had time to tweak it.
 
Currently I am stuck with

bad symbolic reference. A signature in Stage.class refers to term javafx in package <root> which is not available. It may be completely missing from the current classpath, or the version on the classpath might be incompatible with the version used when compiling Stage.class.

Classic missing JavaFX lib from your classpath. JavaFX is delivered with the JRE, yet its jar is NOT on the standard classpath. Add it manually.

Hope this might help keep you trying in spite of the steady learning curve.

Regards,
Alain

Eric Kolotyluk

unread,
Apr 19, 2013, 10:25:56 AM4/19/13
to scalaf...@googlegroups.com
Yes, that is a classic screw-up on the part of Oracle. I added jfxrt.jar to my classpath and it fixes that problem. Thanks muchly :-)

I now remember encountering this problem before with JavaFX. My sense is that Oracle do not consider JavaFX important enough to support properly. Hopefully this will be fixed in Java 8.

An automated way to fix this problem would be to use Maven, put jfxrt.jar in Maven Central, and make jfxrt.jar a transitive dependency. My sense is that all of this could be automated by a properly defined ScalaFX archetype for Maven. Automation is almost always better than documentation.



Hope this might help keep you trying in spite of the steady learning curve.

Thanks that helps enormously. Now the next problem I am having is


Description    Resource    Path    Location    Type
type mismatch;  found   : scalafx.scene.shape.Rectangle  required: scalafx.scene.Parent    App.scala    /client/src/main/scala/net/kolotyluk/find_duplicate_files/client    line 27    Scala Problem


import scalafx.Includes._
import scalafx.application.JFXApp
import scalafx.scene.Scene
import scalafx.scene.paint.Color
import scalafx.scene.shape.Rectangle
import scalafx.stage.Stage

object App extends JFXApp {
  stage = new JFXApp.PrimaryStage {
    title = "Hello World"
    width = 600
    height = 450
    scene = new Scene {
      fill = Color.LIGHTGREEN
      root = new Rectangle { // line 27
        x = 25
        y = 40
        width = 100
        height = 100
        fill <== when(hover) then Color.GREEN otherwise Color.RED
      }
    }
  }
}

Am I using the most recent example of the Hello World program?

Cheers, Eric


Regards,
Alain

Eric Kolotyluk

unread,
Apr 20, 2013, 12:05:15 PM4/20/13
to scalaf...@googlegroups.com
Does there exist anywhere a working example of Hello World in ScalaFX?

I tried the version from http://code.google.com/p/scalafx/wiki/GettingStarted

package hello

import scalafx.Includes._
import scalafx.application.JFXApp
import scalafx.scene.Scene
import scalafx.scene.paint.Color
import scalafx.scene.shape.Rectangle
import scalafx.stage.Stage

object World extends JFXApp {

  stage = new JFXApp.PrimaryStage {
    title = "Hello World"
    width = 600
    height = 450
    scene = new Scene {
      fill = Color.
LIGHTGREEN
      root = new Rectangle { // line 28
        x = 25

        y = 40
        width = 100
        height = 100
        fill <== when(hover) then Color.GREEN otherwise Color.RED
      }
    }
  }
}

    

but according to the Scala IDE from Typesafe

Description    Resource    Path    Location    Type
type mismatch;  found   : scalafx.scene.shape.Rectangle  required: scalafx.scene.Parent    App.scala    /client/src/main/scala/net/kolotyluk/find_duplicate_files/client    line 28    Scala Problem

Cheers, Eric

Eric Kolotyluk

unread,
Apr 23, 2013, 1:02:02 PM4/23/13
to scalaf...@googlegroups.com
OK, problem solved

Listing of the `hello/World.scala` application object is wrong!

root = new Rectangle {

should be

content = new Rectangle {

Cheers, Eric
Reply all
Reply to author
Forward
0 new messages