CHANGES FOR SCALA 2.10*

68 views
Skip to first unread message

Daniel Ferreira Monteiro Alves

unread,
Jul 13, 2012, 2:37:11 PM7/13/12
to scala...@googlegroups.com
The new version of Scala is almost there and the actual ScalaFx does not compiles to it.

One example is the 'then' word used as the DSL to create bindings, now it's a keyword of scala so we must not use it


I will create a clone and do the changes, so we could merge after... I will try to keep the things in sync with the main repository.

Daniel Ferreira Monteiro Alves

unread,
Jul 13, 2012, 7:43:48 PM7/13/12
to scala...@googlegroups.com

Rafael Afonso

unread,
Jul 14, 2012, 1:19:30 AM7/14/12
to scala...@googlegroups.com
Daniel:

In fact "then" will become a new keyword in Scala, working as a complement of "if". See SIP-14 documentation. I think that it will better deprecate "then" methods in Bindings trait and add "use"s method. The "then" methods will call their respectives "use"s.
Now, about onAction setter, what is your intention? Add or remor the "="?

Thanks,

Rafael U. C. Afonso

Daniel Ferreira Monteiro Alves

unread,
Jul 14, 2012, 3:20:41 AM7/14/12
to scala...@googlegroups.com
What I want is just to keep a pattern of use. The slides of the Steve
shows that to set a listener, for example, an action for a button we
should do the following:

new Button {
onAction {
// this is where I defined my handler (added)
}
}

but there is a log of controls that the setter will be in this format
(using the =)

new Button {
onAction = {
// this is my handler
}
}

So I will change the things to the original format.


PS.: I don't know why but when I compiled the scalafx in my house with
some fixes the code for the scala 2.10.0-M5, it just did not matter
with the 'then' keyword.
The only difference is that I compiled with maven and not sbt... for
now, I will postpone the change from "then" to "use" in the Bindings
until that I understand what happened.

Daniel Ferreira Monteiro Alves

unread,
Jul 18, 2012, 6:24:33 PM7/18/12
to scala...@googlegroups.com
Ok, I am reverting this changes... the slides use the "onX = {..." way, the example in the main page is what is wrong using the "onX {..." way.
Reply all
Reply to author
Forward
0 new messages