From: Paul P. <pau...@ho...> - 2004-04-30 05:04:11
|
Date: Thu, 29 Apr 2004 09:21:40 -0700 >From: "Kevin Altis" <al...@se...> >To: "pythoncard-Users" <pyt...@li...> >Subject: [Pythoncard-users] event overview and unused events will no longer be bound > >Rowland and I are gutting the old event system code in the framework >and replacing it with something much simpler without impacting user >code [...] Currently, we bind all >events applicable to a component regardless of whether an event handler >exists for a particular event. > I think this might affect me in vb2py - I use a rather complex mapping(*) to map VB controls onto PythonCard controls. Essentially I have a set of control classes that I register with PythonCard. These controls are proxy's for the real PythonCard classes and there is also a custom metaclass which does some magic in mangling VB attributes, methods, event handlers etc when the class is created so that they play properly with PythonCard. It is possible that your new scheme might result in the event bindings being 'not found' and therefore the converted event handlers will not get called. This may not happen of course, and in any event my use case is pretty extreme, but it would be useful if there was some way I could request a rescan or force the binding of events. Even if this isn't possible, I imagine that I can get around this in the metaclass but if it is simple to expose the scanning/binding process ... ;) Regards, Paul (*) There are simpler, more direct, mappings which wouldn't suffer from this issue but they would involve doing some even more complex type inferencing (or in some cases, guessing!) when I convert the VB into Python. |