
On 25.11 13:26, Malcolm Wallace wrote:
The XTC (extended and typed controls) library might be useful here. Some documentation is available at the Dazzle website: http://www.cs.uu.nl/dazzle/
Yes, that looks quite neat for this. Another alternative is FunctionalForms, but that is larger and perhaps more invasive.
If different information types should have different editing interactions, one option is to add a new method to the InfoKind class, indicating the appropriate interaction style. e.g. (based on the XTC styles)
data InteractStyle = RadioView | SingleSelectionList | MulipleSelectionList | ChoiceView | ValueEntry
Having a customized entry available might make sense: | CustomEntry (a -> IO a)
class InfoKind a where ... interactStyle :: a -> InteractStyle
or even: interact :: a -> IO a with the default method being the current implementation.
Incidentally, the version of XTC.hs currently distributed in Blobs is older than the one on the Dazzle webpage, so it would be worth updating that first.
I'll read the docs there. - Einar Karttunen