Hi Jeremy, hi everyone,

I notice that if I stupidly delete this chunk of the wxc layer, I can
run wxHaskell off the wxWidgets 2.8 that ships with MacOS X (Leopard).
I imagine that this has a negative side effect relating to event
handlers, but my own program seems to work fine.

Without it, I get this warning/error when I launch my program
  assert "m_dynamicEvents" failed in SearchDynamicEventTable():
plus an annoying dialog box that I can seemingly dismiss to no
ill effect.

Do you have any idea what's going on here?  I wonder if there is a way
to divorce this bit of code from wxcore and maybe supply it as extra
functionality in a separate package?

If it turns out to be harmless, that'd be really great because it means
that wxHaskell becomes *painless* to install on Mac.

Thanks!

PS. I'm not sending it as a proper darcs patch because it's really just
for comment... surely there is a "right" way to get the same sort of
result?

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, try +44 (0)1273 64 2905 or
xmpp:ko...@jabber.fr (Jabber or Google Talk only)
--- wxcore-0.12.1.6/src/cpp/wrapper.cpp 2010-05-21 13:49:35.000000000 +0100
+++ wxcore-0.12.1.6-nodynamic/src/cpp/wrapper.cpp       2011-03-12 
16:41:42.000000000 +0000
@@ -221,20 +221,6 @@
 
 EWXWEXPORT(wxClosure*,wxEvtHandler_GetClosure)(wxEvtHandler* evtHandler,int 
id,int type)
 {
-  wxCommandEvent  event(type,id);     //We can use any kind of event here
-  wxCallback*     callback = NULL;
-  bool            found    = false;
-
-  //set the global variable 'getCallback' so HandleEvent
-  //knows we just want to know the closure. Unfortunately, this
-  //seems the cleanest way to retrieve the callback in wxWindows.
-  getCallback = &callback;
-  found = evtHandler->SearchDynamicEventTable( event );
-  getCallback = NULL;
-
-  if (found && callback)
-    return callback->GetClosure();
-  else
     return NULL;
 }
 

Attachment: pgpke6nj7EDnz.pgp
Description: PGP signature

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
wxhaskell-devel mailing list
wxhaskell-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel

Reply via email to