Quoting Rouan van Dalen <rvda...@yahoo.co.uk>: > I need to recursively iterate through all the containers in a window > to get to the widgets in the window, which are not containers. > > I scanned the Gtk2hs docs and I could not find a good way to > determine if a widget is a container or not. I saw that the > GObjectClass defines a isA function. am I going in the right > direction here or is there a better way to recurse through > containers in Gtk2hs?
I think there's not really a great way to do it. You can try using castToContainer and catching an the exception that gets thrown when it fails. Arguably there should be some safeCast functions which return Maybe's. Is there a reason you can't keep track yourself of which widgets are containers and which aren't? That really seems like what you ought to do (and just generally seems like a good idea anyway). ~d ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Gtk2hs-devel mailing list Gtk2hs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel