I think HasWidgets is useful because when focus is moved to another widget, I somehow need to find the widget that just got the focus in collection of widgets.. So I need to somehow search in widget map. I need a typeclass because I may have different types of widget containers and I want to be able to update them uniformly. --- Ömer Sinan Ağacan http://osa1.net 2014-03-03 12:14 GMT+02:00 Daniel Trstenjak <daniel.trstenjak@gmail.com>:
Hi Ömer,
I don't think that you need the 'HasWidgets' class, it really doesn't give you a lot. Something like a function 'withFocused' would be a lot more useful:
withFocused :: (Widget -> Widget) -> State Program ()
Greetings, Daniel _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe