balderdashy / mast

UI conventions built on top of Backbone.JS
MIT License
81 stars 14 forks source link

Global Shorthand Doesn't Work #127

Closed particlebanana closed 11 years ago

particlebanana commented 11 years ago

When an event is triggered on the global event emitter the shorthand listeners never get run.

So in a component if I do:

FRAMEWORK.trigger('someevent', { foo: 'bar' });

Then I have shorthand like:

'%someevent': function(obj) {
    console.log(obj);
}

The shorthand will never fire. If I listen for the event using FRAMEWORK.on('someevent', function(obj) {} it gets it.

This is a pretty big issue for the current project as there is no way to have event listeners. We have to build up manual event delegators again.

particlebanana commented 11 years ago

Looks like it works if I emit %someevent. I always forget that!