Re: [Haskell-cafe] wxHaskell: getting a checkbox state

2005-09-16 Thread Remi Turk
On Fri, Sep 16, 2005 at 12:12:50AM +0200, Sebastian Sylvan wrote: On 9/14/05, Mark Carter [EMAIL PROTECTED] wrote: The problem I was having before was that I was trying to create a separate function onCbEdit, thus: cbEdit - checkBox p1 [text := Edit Mode, on command := onCbEdit

Re: [Haskell-cafe] wxHaskell: getting a checkbox state

2005-09-16 Thread Mark Carter
Remi Turk wrote: No extensions are needed, actually: cbEdit - checBox p1 [text := Edit Mode, on comand ::= onCbEdit textlog] ^^^ Note the double colon. Happy hacking, Remi Many

Re: [Haskell-cafe] wxHaskell: getting a checkbox state

2005-09-15 Thread Sebastian Sylvan
On 9/14/05, Mark Carter [EMAIL PROTECTED] wrote: Arthur Baars wrote: Hi, A Checkbox is instance of the class Checkable: http://wxhaskell.sourceforge.net/doc/ Graphics.UI.WX.Classes.html#t%3ACheckable This means you can get and set the checked property for checkboxes. for

[Haskell-cafe] wxHaskell: getting a checkbox state

2005-09-14 Thread Mark Carter
I'm a complete n00b to Haskell, and I am trying to write an experimental app using wxHaskell. I'm getting on suprisingly well, given that I have practially no idea what I'm doing. In my main loop I have cbEdit - checkBox p1 [text := Edit Mode, on command := onCbEdit textlog ] where p1

Re: [Haskell-cafe] wxHaskell: getting a checkbox state

2005-09-14 Thread Arthur Baars
Hi, A Checkbox is instance of the class Checkable: http://wxhaskell.sourceforge.net/doc/ Graphics.UI.WX.Classes.html#t%3ACheckable This means you can get and set the checked property for checkboxes. for example: c - get cbEdit checked set cbEdit [checked := not c ] The following code

Re: [Haskell-cafe] wxHaskell: getting a checkbox state

2005-09-14 Thread Joel Reymont
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

Re: [Haskell-cafe] wxHaskell: getting a checkbox state

2005-09-14 Thread Duncan Coutts
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

Re: [Haskell-cafe] wxHaskell: getting a checkbox state

2005-09-14 Thread Mark Carter
Arthur Baars wrote: Hi, A Checkbox is instance of the class Checkable: http://wxhaskell.sourceforge.net/doc/ Graphics.UI.WX.Classes.html#t%3ACheckable This means you can get and set the checked property for checkboxes. for example: c - get cbEdit checked set cbEdit [checked := not c ]