Interesting. I see the potential value there. With great power comes great responsibility. This opens up the door for me to override my event handlers unintentionally. Maybe this won't be such a bad problem if I stick to a consistent naming scheme for events. I'll have to wait and see how frequently I sabotage myself in the future.
Is there any way to mark an event-handler as "final" such that it can no longer be overridden? Perhaps instead an error could be added if an event-handler is defined more than once in the same ModelGlue.xml? This would be similar to how you can override a function from a cfc that you are extending but you cant declare the same function twice in the same cfc. Could you point me to an example of extending an application by using multiple ModelGlue.xml files? I'd like to add that to http://docs.model-glue.com/wiki if it isn't there somewhere already. Thanks, David On Jun 4, 10:23 am, Dan Wilson <[email protected]> wrote: > You are asking good questions. > > Event Handlers are built to override event handlers of the same name. > > This means, you can provide a set of event handlers for an application, then > include another ModelGlue.xml file that will override the original event > handlers. When used effectively, this technique can really be powerful. You > can have a Core application and then override what needs to be changed in an > application-specific file. > > DW > > On Fri, Jun 4, 2010 at 10:16 AM, David J Henry < > > > > > > [email protected]> wrote: > > What is the expected outcome of two event-handlers with the same name > > in ModelGlue.xml? > > > Unless I am misinterpreting what I am seeing, it appears the first > > event-handler is completely ignored. I would have expected the second > > one to add/combine to the first one or both event-handlers to fire in > > sequence or at least an error message. > > > Is there some reason behind this or it just the way event-handlers > > were built? > > > -- > > Model-Glue Sites: > > Home Page:http://www.model-glue.com > > Documentation:http://docs.model-glue.com > > Bug Tracker:http://bugs.model-glue.com > > Blog:http://www.model-glue.com/blog > > > You received this message because you are subscribed to the Google > > Groups "model-glue" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected]<model-glue%2bunsubscr...@googlegrou > > ps.com> > > For more options, visit this group at > >http://groups.google.com/group/model-glue?hl=en > > -- > William Osler - "We are here to add what we can to life, not to get what we > can from life." -- Model-Glue Sites: Home Page: http://www.model-glue.com Documentation: http://docs.model-glue.com Bug Tracker: http://bugs.model-glue.com Blog: http://www.model-glue.com/blog You received this message because you are subscribed to the Google Groups "model-glue" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/model-glue?hl=en
