On Thu, Jul 24, 2008 at 05:14:42PM +0200, David Kaplan wrote:
> Hi,
>
> No, it doesn't appear to work with or without my changes. Also, it
> looks to me like the following code is now misplaced in backend_wx.py:
>
> # Event binding code changed after version 2.5
> if wx.VERSION_STRING >= '2.5':
> def bind(actor,event,action,**kw):
> actor.Bind(event,action,**kw)
> else:
> def bind(actor,event,action,id=None):
> if id is not None:
> event(actor, id, action)
> else:
> event(actor,action)
>
> It now appears after some functions not in the class. Is this OK?
This code is not part of any class. Anyway, I moved it to the top
of the file.
> Also, I noticed that this defines bind, while elsewhere in the class
> self.Bind is used. Is this correct? If so, should these other
> references perhaps take advantage of your abstraction?
I've committed a change so that all functions now use
bind(self, wx.EVT, callback, id=id)
rather than
if wx.VERSION_STRING >= '2.5':
self.Bind(wx.EVT,callback,id=id)
else:
wx.EVT(self, id, callback)
I'm not set up to test against wx < 2.5, though given its age
and the small user base of matplotlib wx, I'm not sure that
it is relevant anymore.
- Paul
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel