Le 02/04/2014 20:44, MartinW a écrit :
First of all thank you for taking the time to explain all this to me! I
already learned a lot about working with the spec widgets..

You're giving me good code to work with, and the things I use are more Morphic than Spec, which is more in my circle of confidence.

I still have a problem. The first version with the hardcoded collections did
obviously change the original collections (that's the desired behaviour).

The last version though, did change the items in the list views, but not the
original collections.

You're right. My problem is that I couldn't see a way to link the ListModel to the collection so that a change to one of them would propagate to the other. I'll go and do some reading on Spec.

Another approach, that I would use, is to put more complex objects inside the lists. Thoses objects would know how to get added / removed from their respective collections, and then I would propagate collection changes to the ListModel instances.

Does it makes sense?

Thierry
--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95

Reply via email to