Ed Leafe wrote:
> Log:
> Added the ability to pass event bindings to the constructor of an object.
> 
> They must be in the form of 'On<name of Event>=method'; e.g.:
> 
> dabo.ui.dButton(self, Caption="Close", OnHit=self.onClose)
> 
> I think that this is very much in the spirit of auto-binding of events, and a 
> lot cleaner-looking and easier to understand than the on<evt>_<RegID> 
> construct for contained objects. It's also consistent with the passing of 
> 'bindfunc' to menu items' constructors. Finally, I have a ton of places where 
> I create a button and then do a bindEvent() to the Hit event immediately 
> afterward. This eliminates that extra code.

+1. I like it a lot, at least in theory!

I never liked the bindFunc arg to menus... let's deprecate that and 
force the use the OnHit=func way.

I don't tend to use the auto event binding combined with the regid, 
although I thought I would use it a lot at the time. I do use auto event 
binding when defining a class.

Like you, I'm constantly annoyed at having to do the separate 
bindEvent() after instantiating the base control.

-- 
pkm ~ http://paulmcnett.com


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to