On 3 June 2011 12:44, <E.Y.Kow@brighton.ac.uk> wrote:
On Fri, Jun 03, 2011 at 12:14:58 +0100, Jeremy O'Donoghue wrote:
>    - Bugfix for assert error in SearchDynamicEventTable which was found in
>    debug builds. I believe that this is a proper fix for an issue Eric noted a
>    couple of months back.

It's not just debug builds (of what?),

Of wxWidgets itself. I don't see the assertion for retail builds. I *do* see the assertion on debug builds for Windows, so I don't think it's a Mac issue.

but basically the scenario where
you naively type "cabal install wx" on MacOS after having installed the
Haskell Platform and nothing else.   Macs ship with wxWidgets, albeit
with this crucial bit of missing functionality.

I'm a bit concerned that this may result in silently-does-the-wrong-thing

+  if (evtHandler->GetDynamicEventTable() != NULL)
+    found = evtHandler->SearchDynamicEventTable( event );

As I'd discovered to my dismay, without this trawl through the non-existent
dynamic event table, things like scrolled list boxes stop responding to events.

This is a bit more worrying - it's likely to be seen on other platforms as well. I didn't see the problem on any of the (few) test cases I ran, but it sounds more like a failure of what might laughably be called my test regime than a Mac specific issue.
If I understand the patch correctly, the result of this is that (A)
users would be able to happily install wxHaskell on Mac without any
prerequisites, but (B) if they were to use such a widget, it would just
silently not-work.

No - I think it would silently not work everywhere :-(
The even better solution would be for somebody to go understand how the event
handling code works and propose a solution that works without the missing
dynamic event table

That's probably a better bet. I have the impression that you're not really supposed to call wxEvent::SearchDynamicEventTable() from outside anyway. They seem to have gone to some lengths to not document it in wxWidgets.

I will have a go at understanding the event handling code. Wish me luck, I'll probably need it...