Skip to content
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

New feature: System for dispatching/listening to events sent thorugh non-related classes #42

Closed
alfongj opened this issue Aug 3, 2011 · 1 comment
Assignees

Comments

@alfongj
Copy link
Owner

alfongj commented Aug 3, 2011

As there are many classes in the current project, and most of them aren't directly related to one another, custom events can't be transmitted in many scenarios without an EventDispatcher that is able to work on all classes.

Therefore, a new singleton class that manages the dispatching and listening to events to any class who has an instance of it, is needed to solve the problem cleanly.

@alfongj alfongj closed this as completed in 72b2c41 Aug 3, 2011
@ghost ghost assigned alfongj Aug 3, 2011
@alfongj
Copy link
Owner Author

alfongj commented Aug 3, 2011

The solution consists in 2 classes: util.EventManager (which is a class that extends from EventDispatcher giving it the structure of a Singleton) ad util.EvCodes which acts as an Enum for defining custom event codes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant