[bug][7.7][Aragon] Aragon breaks interaction between MultiSelectionInList and MultiSelectionDataSetView

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

[bug][7.7][Aragon] Aragon breaks interaction between MultiSelectionInList and MultiSelectionDataSetView

Joerg Beekmann, DeepCove Labs (YVR)

After porting to 7.7 we started noticing a DNU when the selections of a MultiSelectionInList attached to a MultiSelectionDataSetView were set. The reason for the DNU are that the when the selections are converted to a collection of indexes that collection of indexes is a Set. This results in a DNU when the last element of the selections is requested. It seems to be a Set because of the following line in the initialize as provided by a Aragon override.

 

MultiSelectionInList  initialize

….

                ldm := Smalltalk at: #LensDataManager ifAbsent: [^self selectionIndexHolder: Set new asValue].

 

Why does this break now? Because in 7.6 no selectionIndex (singular) was set when the selections (plural) were set. In 7.7 this is not true, the selectionIndex is set to the last element of the set of selections.

 

VW 7.6

selections: aCollection

 

                (selections = aCollection or: [sequence == nil]) ifTrue: [^self].

                selections := aCollection.

                selectionIndex := self zeroIndex.

                self invalidate.

 

VW 7.7

selections: aCollection

 

                (selections = aCollection or: [sequence == nil]) ifTrue: [^self].

                selections := aCollection.

                selectionIndex := aCollection isEmpty

                                                                ifTrue: [self zeroIndex]

                                                                ifFalse: [aCollection last]. <<======= this is new!

                self invalidate

 

I see several options;

·         use a OrderedCollection for the selection indexes

·         override selections: and not set the selectionIndex.

·         add last to Set returning any,

·         override the selections: method in the view to use any if the collection is a set,

 

None is perfect. Has anyone else encountered this and come up with a solution?

 

 

Joerg

 

Unhandled exception: Message not understood: #last

Set(Object)>>doesNotUnderstand:

MultiSelectionDataSetView>>selections:

MultiSelectionDataSetView>>updateSelectionChannel

MultiSelectionDataSetView>>updateSelectionChannel:

MultiSelectionDataSetView(SelectionView)>>update:with:from:

MultiSelectionDataSetView(DataSetView)>>update:with:from:

DependentsCollection>>update:with:from:

ValueHolder(Object)>>changed:with:

ValueHolder(Object)>>changed:

ValueHolder(ValueModel)>>value:

MultiSelectionInList>>selectionIndexes:

MultiSelectionInList>>selections:

DeepCoveLabs.TicketLineItemsUI>>selectLines:

 

-----
Joerg Beekmann
DeepCove Labs
4th floor 595 Howe Street
Vancouver, BC, V6C 2T5
voice +1.604.689.0322
fax   +1.604.689.0311
<a href="blocked::mailto:joerg@deepcovelabs.com" title="blocked::mailto:joerg@deepcovelabs.com">joerg@...


CONFIDENTIALITY NOTICE - This email contains private and confidential
information. If it is not intended for you, delete it and any attachments.

 

 


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [bug][7.7][Aragon] Aragon breaks interaction between MultiSelectionInList and MultiSelectionDataSetView

Michael Lucas-Smith-2
My opinion would be to change the Aragon override to create an OrderedCollection, not a set. I can't begin to guess why Aragon thinks its a good idea to have a global selection index holder.. but, if that's what it wants to do - the internal expectation changed to be an OC, not a Set.

Cheers,
Michael

On 4/30/10 11:26 AM, Joerg Beekmann, DeepCove Labs (YVR) wrote:

After porting to 7.7 we started noticing a DNU when the selections of a MultiSelectionInList attached to a MultiSelectionDataSetView were set. The reason for the DNU are that the when the selections are converted to a collection of indexes that collection of indexes is a Set. This results in a DNU when the last element of the selections is requested. It seems to be a Set because of the following line in the initialize as provided by a Aragon override.

 

MultiSelectionInList  initialize

….

                ldm := Smalltalk at: #LensDataManager ifAbsent: [^self selectionIndexHolder: Set new asValue].

 

Why does this break now? Because in 7.6 no selectionIndex (singular) was set when the selections (plural) were set. In 7.7 this is not true, the selectionIndex is set to the last element of the set of selections.

 

VW 7.6

selections: aCollection

 

                (selections = aCollection or: [sequence == nil]) ifTrue: [^self].

                selections := aCollection.

                selectionIndex := self zeroIndex.

                self invalidate.

 

VW 7.7

selections: aCollection

 

                (selections = aCollection or: [sequence == nil]) ifTrue: [^self].

                selections := aCollection.

                selectionIndex := aCollection isEmpty

                                                                ifTrue: [self zeroIndex]

                                                                ifFalse: [aCollection last]. <<======= this is new!

                self invalidate

 

I see several options;

·         use a OrderedCollection for the selection indexes

·         override selections: and not set the selectionIndex.

·         add last to Set returning any,

·         override the selections: method in the view to use any if the collection is a set,

 

None is perfect. Has anyone else encountered this and come up with a solution?

 

 

Joerg

 

Unhandled exception: Message not understood: #last

Set(Object)>>doesNotUnderstand:

MultiSelectionDataSetView>>selections:

MultiSelectionDataSetView>>updateSelectionChannel

MultiSelectionDataSetView>>updateSelectionChannel:

MultiSelectionDataSetView(SelectionView)>>update:with:from:

MultiSelectionDataSetView(DataSetView)>>update:with:from:

DependentsCollection>>update:with:from:

ValueHolder(Object)>>changed:with:

ValueHolder(Object)>>changed:

ValueHolder(ValueModel)>>value:

MultiSelectionInList>>selectionIndexes:

MultiSelectionInList>>selections:

DeepCoveLabs.TicketLineItemsUI>>selectLines:

 

-----
Joerg Beekmann
DeepCove Labs
4th floor 595 Howe Street
Vancouver, BC, V6C 2T5
voice +1.604.689.0322
fax   +1.604.689.0311
<a moz-do-not-send="true" href="blocked::mailto:joerg@deepcovelabs.com" title="blocked::mailto:joerg@deepcovelabs.com">joerg@...


CONFIDENTIALITY NOTICE - This email contains private and confidential
information. If it is not intended for you, delete it and any attachments.

 

 

_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc