Fork me on GitHub

Monday, February 11, 2013

Scaloid 1.0 is released

Today, I released Scaloid 1.0. Some of major improvements are including:
  • Source code is subdivided into several groups
  • Traits Destroyable and Creatable is introduced
  • style() is safe for non-exhaustive PartialFunction pattern matching

For a short comment about the last thing, let's see an example as follows:
new SLinearLayout {
  style {
    case b: SButton => b.text(b.text.toString.toUpperCase)
  }
  STextView("Hello")
}
The style is defined only for the class SButton. However, a view widget STextView is defined in the layout. Previous version of Scaloid emits an exception because the pattern matching is not exhaustive. In Scaloid 1.0, it simply ignores it when the widget is not defined in the styles.

No comments:

Post a Comment