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

Should the observers be in XDE-ISIRController? #1

Open
sovannara-hak opened this issue Apr 7, 2014 · 2 comments
Open

Should the observers be in XDE-ISIRController? #1

sovannara-hak opened this issue Apr 7, 2014 · 2 comments

Comments

@sovannara-hak
Copy link

XDE-ISIRController contains a couple of observers,
but some of them are not related to the controller, typically, the screenshot grabber.

Should we move all/part of the observers to XDE-WorldManager ?

How can we do it without breaking old scripts ?

@salini
Copy link
Contributor

salini commented Apr 7, 2014

You're right, some parts should belong to something else than the controller.
A possible way would be to define an observer class into a mandatory package (in XDE-WorldManager, or by reusing the XDE-Observers previously defined), to copy these observers into this package (by respecting the pattern based on an update method with no arguments), and to create a proxy in XDE-ISIRController to avoid broken script as follows:
"""
import mandatoryPakage
theObserver = mandatoryPakage.theObserver
"""
What do you think?

@sovannara-hak
Copy link
Author

That's an excellent idea, thanks!

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

No branches or pull requests

2 participants