Issue 7310 in pharo: PickListModel should be improved

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

Issue 7310 in pharo: PickListModel should be improved

pharo
Status: Accepted
Owner: [hidden email]
CC: [hidden email]
Labels: Type-Bug Target-Nautilus Milestone-2.0

New issue 7310 by [hidden email]: PickListModel should be improved
http://code.google.com/p/pharo/issues/detail?id=7310

The following example shows two problems with the current PickListModel:

| instance |

instance := PickListModel new.
instance openWithSpec.
instance items: {4. 2. 55. 4. 4. }.
^ instance

First, all 4s are the same item, and cannot be selected independently. A  
bug, I would say.
Second, the Set does not preserve the order, so `instance pickedItems` does  
not have the natural order.


The problem is that PickListModel >> #initialize initializes the  
field 'pickedItemsHolder' with a Set.
This set is never exposed and not customizable directly.
So well, I would say a Set is an unfortunate choice for a list widget.
Lists have a natural order, and it is not obvious to me why that order  
should not be preserved.

I might miss here other tradeoffs of course, but replacing the Set by a  
OrderedCollection solves my current problem. It does not solve the issue  
with multiple entries however.

Reported by Stefan Marr



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7310 in pharo: PickListModel should be improved

pharo
Updates:
        Labels: -Target-Nautilus

Comment #1 on issue 7310 by [hidden email]: PickListModel should be  
improved
http://code.google.com/p/pharo/issues/detail?id=7310

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7310 in pharo: PickListModel should be improved

pharo
Updates:
        Status: FixReviewNeeded

Comment #2 on issue 7310 by [hidden email]: PickListModel should be  
improved
http://code.google.com/p/pharo/issues/detail?id=7310

Slice in the inbox


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7310 in pharo: PickListModel should be improved

pharo

Comment #3 on issue 7310 by [hidden email]: PickListModel should be  
improved
http://code.google.com/p/pharo/issues/detail?id=7310

Thanks a lot ben!!!

This is cool to have you with us.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7310 in pharo: PickListModel should be improved

pharo

Comment #4 on issue 7310 by [hidden email]: PickListModel should be  
improved
http://code.google.com/p/pharo/issues/detail?id=7310

Ben, there are still ordering issues with the example.
Now, the order is determined by the order of the operations that select the  
items, instead of the order in which the items are displayed in the list.
I would perceive the later as the natural order.

The order of the user interaction is insignificant in most user interfaces  
that offer such widgets, no?

Thanks!


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7310 in pharo: PickListModel should be improved

pharo
Updates:
        Status: FixToInclude

Comment #5 on issue 7310 by [hidden email]: PickListModel should be  
improved
http://code.google.com/p/pharo/issues/detail?id=7310

I will add this first step already and then set the issue to work needed.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7310 in pharo: PickListModel should be improved

pharo
Updates:
        Status: WorkNeeded
        Labels: -Milestone-2.0

Comment #6 on issue 7310 by [hidden email]: PickListModel should be  
improved
http://code.google.com/p/pharo/issues/detail?id=7310

in 2.0 493


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7310 in pharo: PickListModel should be improved

pharo
Updates:
        Status: Closed

Comment #7 on issue 7310 by [hidden email]: PickListModel should be  
improved
http://code.google.com/p/pharo/issues/detail?id=7310

Apparently there is a problem because this change break the create accessor  
and extract method refactorings
I created an issue for that so I closed this one.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7310 in pharo: PickListModel should be improved

pharo
In reply to this post by pharo

Comment #9 on issue 7310 by [hidden email]: PickListModel should be  
improved
http://code.google.com/p/pharo/issues/detail?id=7310

"The order of the user interaction is insignificant in most user interfaces  
that offer such widgets, no?"

I do not agree with this. I have use cases where the order you select is  
important.
I will see if we can have both :)

@stef: what is the issue number of the issue you created ?


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 7310 in pharo: PickListModel should be improved

pharo

Comment #10 on issue 7310 by [hidden email]: PickListModel should be  
improved
http://code.google.com/p/pharo/issues/detail?id=7310

I have introduced a new protocol method #selectedItems which returns the  
selected items according to the list order. There still is pickedItems  
which returns the selected items according to the order they have been  
picked.

I have fix the ChangeBrowser to use the new api, see issue 7209


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker