-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application level event emitter? #14
Comments
What are the requirements for those events? |
I dunno... Maybe like triggering events across an entire application. |
Well, keep in mind that "Application" is a reserved word (for the application scope). A common way to solve this problem would be to instantiate an event handler and put it into the application scope:
Then in subsequent pages, you could do:
Also, don't forget to wrap that stuff with the appropriate scope-locks (cflock tag). |
No, I'm specifically referring to tying into the app scope. But it would be locked within emitter.
Sent from my iPhone On Sep 27, 2012, at 7:19 PM, Russ [email protected] wrote: Well, keep in mind that "Application" is a reserved word (for the application.eventHandler.on('customEvent',function() {}); Then in subsequent pages, you could do: application.eventHandler.trigger('customEvent'); Also, don't forget to wrap that stuff with the appropriate scope-locks — |
I don't understand. Could you explain more? |
I'm sorry, we're saying the same thing! Sent from my iPhone On Sep 27, 2012, at 7:36 PM, Russ [email protected] wrote: I don't understand. Could you explain more? — |
But ya, like you said it would manage locks and race conditions. |
Brain storming on how we could manage app level events.
Thinking the emitter's domain code
The text was updated successfully, but these errors were encountered: