[grapefruit] list widget?
g9ks157k at acme.softbase.org
Thu Apr 9 05:24:52 EDT 2009
Am Mittwoch, 8. April 2009 23:18 schrieb anklesaria at gmail.com:
> In list views, is there any way to see the indexes of the selection, rather
> than the elements themselves? I ask because, in order to delete, modify,
> or insert near the selection, it seems one needs its index.
Yes, this is true. My students discovered this deficiency during their work on
the Grapefruit-based darcs GUI. Our solution was to introduce set signals and
set views. With these, you only deal with the elements themselves, not with
Alas, the students discovered another problem when they tried to delete the
currently selected elements. I don’t have the time to explain this at the
moment, since I’ll leave for easter holidays very soon. I’ll be back at
tuesday. If you want more details, please ask.
My current plans are to replace list views and set views by map views. The
keys of the map would identify the lines in the view (instead of indices) and
the ordering of the keys would be the ordering of the lines. The contents of
the lines in the map view would be derived from the values assigned to the
For solving the problem with deleting selected elements, I have an idea
already. However, I still have to think about the details. This idea would
also allow the library user to specify the set of initially selected elements
and to implement non-standard selection changes like “go to the next new
mail” in an e-mail client.
I’ll try to implement map views and the changes in selection handling during
the Haskell Hackathon from April 17 to 19.
More information about the Grapefruit