Wednesday, 11 June 2014

HsQML released

I've just released HsQML which, as usual, is available for download from Hackage. This release fixes several stability issues and also introduces a facility for defining properties with the CONST attribute.

If you use a property defined on one of your Haskell objects in a QML expression and that property doesn't have an associated signal, then Qt will print the following warning:

Expression depends on non-NOTIFYable properties

For mutable objects, the accurately informs us that QML has no way of knowing if the value of that property changes. However, when using Haskell, we often prefer to work with immutable values and there was previously no way of informing Qt that the value would never change. Previously, the only course of action was to specify a dummy signal or to use nullary methods instead of properties. You can now use the new defPropertyConst function instead of defPropertyRO to specify that an associated signal is unnecessary and suppress this warning.

As an aside, Christopher Reichert has just written a blog post about using HsQML which is well worth the read.

release- - 2014.06.11

  * Added properties with constant annotation.
  * Added runtime warning for users of the non-threaded RTS.
  * Added non-TH version of Setup.hs.
  * Relaxed Cabal dependency constraint on 'transformers'.
  * Fixed premature garbage collection of QML objects.
  * Fixed intermittent crash on exit when firing signals.
  * Fixed crash when using Cmd-Q to exit on MacOS.

No comments:

Post a Comment