On 1/29/13 11:15 AM, Ed Leafe wrote:
>       Since RegIDs are unique across a form, there is no confusion possible 
> as there is with Name. If you don't want to set RegID, then I think the 
> preferred way to bind would be to pass the method name to an OnHit kwarg.

autoBindEvents works with different contexts:

self
parent
form

So, first try binding the event to an on_ method in self, then try self.Parent, 
and
finally try self.Form. In the situation where self.Parent isn't self.Form, it 
doesn't
always make sense to use RegID (dangerous for a panel to set a RegID for it's 
own
subobjects when that panel has no idea if the form is going to have multiple 
such
RegID's registered, and it doesn't make sense for the form to set the RegID's 
of a
panel's objects - both these seem to violate OOP encapsulation principles), it 
makes
sense to use Name.

When binding at the form level, it only makes sense to use Name if the object 
raising
the event is a direct child, but in all other cases RegID makes sense.

Paul

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to