On Nov 27, 2005, at 1:31 AM, Paul McNett wrote:

I've been running into this issue too. Here's what I propose:

+ Keep the object registration at the form level.

    Agreed.

+ Add code to autoBindEvents() to search not just the form and the class for matching method signatures, but also all parent containers. All found method signatures will be bound, even if there's one at the panel level and one at the form level.

Why containers? How would they have methods if they weren't defined as classes?

There is also one big questionmark: what if you define a button class, and want to bind Hit to a method? If the button class had an onHit() method, would that work? What if several were dropped on a form? You couldn't have a RegID-based method, since that ID wouldn't be determined until the instance was added to the form.

Whenever I start thinking about this, I keep hearing a voice that says "Explicit is better than implicit...". ;-)

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




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

Reply via email to