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

Behaviors need OFF mechanism. #42

Open
michaelelfial opened this issue Sep 18, 2020 · 0 comments
Open

Behaviors need OFF mechanism. #42

michaelelfial opened this issue Sep 18, 2020 · 0 comments
Labels
bug Something isn't working TO DO Task Well-defined Task

Comments

@michaelelfial
Copy link
Contributor

For a long time behaviors were rarely used and the evolution of BK obsoleted some old mechanisms. For this reason we need fine tuning of behaviors attachment and detachment. When the same behavior is attached (same phase, same args, same class) any existing should be properly detached (this is currently not done and multiple behavior instances can remain active sometimes).

Better implementation should aim at avoiding duplication at all (it can happen in convoluted template binding) and when unavoidable properly detach the old instance before replacing it with the new one.

Detachment when template is destroyed seems to be ok, but if a new method called on detachment is introduced we should consider calling it on template destruction too. Not sure how important this is - event handlers in the behavior's instance do not need removal on destruction - they be destroyed die anyway, but if the behavior have something else (not part of its instance) to deinit, then this will be important.

@michaelelfial michaelelfial added bug Something isn't working TO DO Task Well-defined Task labels Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working TO DO Task Well-defined Task
Projects
None yet
Development

No branches or pull requests

1 participant