ftlabs / fruitmachine

View rendering engine
MIT License
247 stars 18 forks source link

`View#setID()` required. #21

Closed wilsonpage closed 11 years ago

wilsonpage commented 11 years ago

Use case:

var layout = new Layout();
var layout2 = new Layout2();
var apple = new Apple({ id: 'layout1_child'  });

layout
  .add(apple)
  .render();

layout.remove(apple);

apple.setID('layout2_child');

layout.add(apple);

Is this viable? Perhaps a new apple should just be created with the correct id. I'm not sure there is much value in shifting views around. As long as the model is decoupled, it can be shared.

Thoughts @matthew-andrews?

matthew-andrews commented 11 years ago

Sorry I just saw my mention now.. Is this fixed by your slot work?

wilsonpage commented 11 years ago

This is now not an issue with the new slots concept.