"Bindable" or "Observable" collections on Pharo/Smalltalk?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

"Bindable" or "Observable" collections on Pharo/Smalltalk?

gerard alis
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
Reply | Threaded
Open this post in threaded view
|

Re: "Bindable" or "Observable" collections on Pharo/Smalltalk?

Schwab,Wilhelm K
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: [hidden email] [[hidden email]] On Behalf Of nullPointer [[hidden email]]
Sent: Friday, January 14, 2011 4:35 PM
To: [hidden email]
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-tp3218402p3218402.html
Sent from the Pharo Smalltalk mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: "Bindable" or "Observable" collections on Pharo/Smalltalk?

Stéphane Ducasse
In reply to this post by gerard alis
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-tp3218402p3218402.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>