[Haskell-cafe] wxHaskell: getting a checkbox state

Duncan Coutts duncan.coutts at worcester.oxford.ac.uk
Wed Sep 14 12:36:12 EDT 2005


On Wed, 2005-09-14 at 18:24 +0200, Joel Reymont wrote:
> On Sep 14, 2005, at 5:54 PM, Arthur Baars wrote:
> 
> > This means you can "get" and "set" the "checked" property for  
> > checkboxes.
> > for example:
> >  c <- get cbEdit checked
> >  set cbEdit [checked := not c ]
> 
> Any particular reason to enclose the arguments in square brackets  
> apart from cool-looking syntax?
> 
> Do I correctly understand that 2 arguments are being passed to set,  
> the second being a list of more arguments?

Yes. This syntax was first used in Yampa and is now used in several
Haskel GUI libraries including wxHaskell, Gtk2Hs and hs-fltk.

Duncan



More information about the Haskell-Cafe mailing list