Still confused on events

I'm still struggling with understanding event flow. In particular, I've been looking a lot at the Component.js dispatchEvent method around here:

https://github.com/enyojs/enyo/blob/master/source/kernel/Component.js#L584

I'm puzzled about the different behaviors when there's a delegate versus not. If there is a delegate (and the delegate is the object in question) then a function matching the name in question will get called. If there is no delegate, then a function matching the name will get ignored. However, a property that names another function will get called.

Is there some reason a Component will decline to call a property that is a function unless this object is its own delegate? And if so, should I be setting up some sort of self-delegation just so a Component will call methods on itself?

Thanks!
Sign In or Register to comment.