Goubier Thierry wrote
Yes, I've seen that. It's fine by me that the list displayed in the widget is copied and sorted, just that I would have liked to be able to touch the true collection hidden inside the ListModel. Unless the list model is more like a ListAdaptor in meaning, in which cas I'll know that I have to build better objects around it.
But then, as that example shows, I then have problem connecting the drag and drop to the model.
Then for the convenient methods, I am not that sure :P But maybe itâs a good use case for traits :P
I'd say it depends what a ListModel is. Is this a model, in which case I'd like it to stand for the abstract collection inside and be able to add and remove items in it (and not use the trick of l1 items: l1 getItems), or is this just an adapter? If an adapter, then drag and drop is hard to implement.
Yes exactly. I just naively tried it, without knowing if it was made for this purpose. But i wanted to be able to touch the real collections behind the ListModels and also the real object behind the drag-operation, not only it's string representation. So the user could drag around things between lists and the real objects would get added/removed to the real collections represented by those lists. In the next step i would also have wanted objects represented on the screen by a simple textlabel to be dragged and dropped on any list and then be added to the collection represented by this particular list. -- View this message in context: http://forum.world.st/Drag-and-drop-items-between-list-views-tp4752285p47526... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.