On Dec 19, 2010, at 10:33 PM, Nate Lowrie wrote:
> I just noticed this when I was combing through some code. Lines 71-74
> of CxnEditor.py read:
>
>
> ctl = dui.dDropdownList(self.bg, Choices=[""],
> RegID="connectionSelector",
> OnHit=self.onConnectionSelector)
> ctl.bindEvent(dEvents.Hit, self.onConnectionChange)
>
> My question is if you bind the hit event to self.onConnectionChange in
> line 74, does it override the binding to self.onConnectionSelector in
> the constructor? If so, which one is it supposed to bind to?
Both are bound. You can have multiple handlers for a given event. Try
adding some debug output to those two handlers to see that they are both
called. A common case is for some behavior to be bound at the framework level,
and then have the developer bind additional behavior at the application level.
Having said that, looking at the methods, they do essentially the same
thing, so I'll remove one of them.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]