
25 Jul
2009
25 Jul
'09
11:10 a.m.
Hi list, using gtk2hs I would like to count how often a Menu has been selected (well, not really, but it kind of breaks down to this): let a = 0 onActivateLeaf menuAddOne $ do let a = a+1 print a This leads to a stack overflow. Obviously a=a+1 is iterated over and over again. But how can I add something each time the menu is activated? (Actually I want to open a FileDialog and add the contents of a file to a list but for now, counting would be great). Thanks to everyone for reading, Bernhard