David Harley | 16 Sep 00:09
Picon

ANNOUNCE: qtHaskell 1.1.2, the second preview version of qtHaskell

For all interested in Haskell GUIs, there is now a second preview release  
of qtHaskell - a set of Haskell bindings for Trolltech's Qt available at

http://qthaskell.berlios.de

There are a number of important changes from the previous version.

1. All FFI pointers are now Foreign Pointers. Those of a type derived from  
QObject are wrapped as QPointer types and only this wrapper is deleted  
when their finalizer runs. All other types are automatically deleted by  
their finalizer when they go out of Haskell scope - or more precisely when  
the finalizer acutally runs. To make the actual deletion time more easily  
controlable, most example code uses the function "returnGC" instead of  
just "return" in callback functions. Also non QObject derived types can be  
constructed with an alternative constructor qSomeObject_nf which has no  
finalizer. In this case it's the programmers job to delete the object when  
required.

2. All Qt enumerated types are implemented as equivalent Haskell types  
instead of just being of type Int as before. In fact I'v used separate  
types for enumerated types and their corresponding "flags" types in Qt.  
For example

enum Qt::AlignmentFlag
flags Qt::Alignment

have equivalent qHaskell types:

data CQt__AlignmentFlag a = CQt__AlignmentFlag a
type Qt__AlignmentFlag = QEnum(CQt__AlignmentFlag Int)
(Continue reading)

Wolfgang Jeltsch | 16 Sep 09:35

Re: ANNOUNCE: qtHaskell 1.1.2, the second preview version of qtHaskell

Hello David,

does code written with qtHaskell directly call the respective Qt methods 
internally?  A student of mine who also works on a Qt Haskell binding project 
told me that internally you use a library intended for scripting which 
interprets method names etc. at runtime.  Is this true?

Best wishes,
Wolfgang

Gmane