[Pharo-project] "Bindable" or "Observable" collections on Pharo/Smalltalk?
Hi, excuse me for my poor english. Exist some type of collection for bind to widgets like a listView or grid? I want say a special collection than allow know, externally, when a object is added, removed, changed the "current" etc for represent changes on a GUI. For example, I have a collection connected on a grid. When I add or remove a element on collection I have refresh the grid set again the collection like datasource, and select the same object of before. That is hard for the widget when I have very items. I want "capture", with events or others, and remove only the row of grid, and not refresh all again. I don´t know if I do the question correctly. Regards -- View this message in context: http://forum.world.st/Bindable-or-Observable-collections-on-Pharo-Smalltalk-... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Dolphin's approach to this type of thing would be to use its ListModel as the collection; adding and removing elements triggers events that help the presenters and views connected to it to update (presumably efficiently). ________________________________________ From: pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of nullPointer [epicfan@gmail.com] Sent: Friday, January 14, 2011 4:35 PM To: pharo-project@lists.gforge.inria.fr Subject: [Pharo-project] "Bindable" or "Observable" collections on Pharo/Smalltalk? Hi, excuse me for my poor english. Exist some type of collection for bind to widgets like a listView or grid? I want say a special collection than allow know, externally, when a object is added, removed, changed the "current" etc for represent changes on a GUI. For example, I have a collection connected on a grid. When I add or remove a element on collection I have refresh the grid set again the collection like datasource, and select the same object of before. That is hard for the widget when I have very items. I want "capture", with events or others, and remove only the row of grid, and not refresh all again. I don´t know if I do the question correctly. Regards -- View this message in context: http://forum.world.st/Bindable-or-Observable-collections-on-Pharo-Smalltalk-... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
you have to implement your own container emmitting events. Because normal collection are not done for that but to go fast. Stef On Jan 14, 2011, at 10:35 PM, nullPointer wrote:
Hi, excuse me for my poor english.
Exist some type of collection for bind to widgets like a listView or grid? I want say a special collection than allow know, externally, when a object is added, removed, changed the "current" etc for represent changes on a GUI.
For example, I have a collection connected on a grid. When I add or remove a element on collection I have refresh the grid set again the collection like datasource, and select the same object of before. That is hard for the widget when I have very items. I want "capture", with events or others, and remove only the row of grid, and not refresh all again.
I don´t know if I do the question correctly.
Regards
-- View this message in context: http://forum.world.st/Bindable-or-Observable-collections-on-Pharo-Smalltalk-... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
participants (3)
-
nullPointer -
Schwab,Wilhelm K -
Stéphane Ducasse