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

removing a template element should cause its instances to be removed #4

Open
rafaelw opened this issue Aug 24, 2012 · 2 comments
Open

Comments

@rafaelw
Copy link
Collaborator

rafaelw commented Aug 24, 2012

This is consistent with the "strong connection" view of templates and instances

@ajklein
Copy link
Owner

ajklein commented Aug 24, 2012

If this is done asynchronously as we discussed, it seems pretty tricky. How will the template know, when it's actually going about tearing down instances, where the first instance starts? That's just the first problem. I think the synchronous behavior of fixing-up terminators can also bite us, since a naive implementation could let terminators move before the old start of the template instance.

Both of the above problems seem like their solution will be another hidden bit like the instance terminator, but designating the first node of an instance. Along with some way for the template to find that node, and to keep it updated if that node is removed before the template starts doing its work.

It's not obvious to me, though, that this is all worthwhile. Are abandoned instances causing problems for us?

@ajklein
Copy link
Owner

ajklein commented Aug 28, 2012

Strawman: when abandoning the instance, make a note (Vector<RefPtr<Node> >) of which nodes are currently in the instance(s), and their parent. If, later, those nodes are still on that parent, remove them.

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

2 participants