[web-devel] Rich Internet Applications using Haskell
spam at scientician.net
Thu Feb 10 08:36:20 CET 2011
On 2011-02-10 08:12, Bardur Arantsson wrote:
> Immediate plans:
Oh, and I forgot:
Widget composability. I'm not really sure how best to proceed with this
and whether it's really necessary. The current "workaround" is to have
ordinary Haskell functions (running in the CallbackM monad) which take a
set of event handlers as callbacks and which return a container widget.
mkMyLastNameFormWidget :: CallbackM -> CallbackM Panel
mkMyLastNameFormWidget onChange = do
p <- mkPanel
label <- mkLabel "Last name:"
input <- mkInput
addToPanel p label
addToPanel p input
Getting at the "composed" state is not trivial, though. Currently that
would require mkMyLastNameFormWidget to also return the "input" widget
which would break encapsulation.
More information about the web-devel