Hello
Error report:
If in SqueakMap both options are ticked
'New safely available packages' 'Installed packages'
nothing is shown.
However if I only tick 'Installed packages'
then the installed package is shown. So the selection is not cumulative.
Regards Hannes
Right, it looks like the filters form a conjunction. Probably intentional, but not necessarily what we still want today. SqueakMap client window could stand to be scrtuinized and improved.
On Fri, Sep 11, 2015 at 3:45 AM, H. Hirzel hannes.hirzel@gmail.com wrote:
Hello
Error report:
If in SqueakMap both options are ticked
'New safely available packages' 'Installed packages'
nothing is shown.
However if I only tick 'Installed packages'
then the installed package is shown. So the selection is not cumulative.
Regards Hannes
The SqueakMap Package Loader window has as model an instance of SMLoaderPlus
And this are the selectors of interest
SMLoaderPlus>>filterInstalled ^[:package | package isInstalled]
SMLoaderPlus>>filterSafelyAvailable ^[:package | package isSafelyAvailable]
SMLoaderPlus has an instance variable called 'filters' which has as content
an OrderedCollection(#filterInstalled #filterSafelyAvailable)
for the case at hand, i.e. when both are selected.
This instance variable is accessed by
SMLoaderPlus >>packageListCalculated "Return a list of the SMPackages that should be visible by applying all the filters. Also filter based on the currently selected category - if any." ^ self packages select: [:p | filters allSatisfy: [:currFilter | currFilter isSymbol ifTrue: [(self perform: currFilter) value: p] ifFalse: [self package: p filteredByCategory: (map object: currFilter)]]]
#allSatisfy:
is used which means that this is an 'and' operation.
If it is replaced by
#anySatisfy:
it starts working as intended.
On 9/11/15, Chris Muller asqueaker@gmail.com wrote:
Right, it looks like the filters form a conjunction. Probably intentional, but not necessarily what we still want today. SqueakMap client window could stand to be scrtuinized and improved.
On Fri, Sep 11, 2015 at 3:45 AM, H. Hirzel hannes.hirzel@gmail.com wrote:
Hello
Error report:
If in SqueakMap both options are ticked
'New safely available packages' 'Installed packages'
nothing is shown.
However if I only tick 'Installed packages'
then the installed package is shown. So the selection is not cumulative.
Regards Hannes
On Sat, Sep 12, 2015 at 03:47:57PM +0200, H. Hirzel wrote:
The SqueakMap Package Loader window has as model an instance of SMLoaderPlus
And this are the selectors of interest
SMLoaderPlus>>filterInstalled ^[:package | package isInstalled]
SMLoaderPlus>>filterSafelyAvailable ^[:package | package isSafelyAvailable]
SMLoaderPlus has an instance variable called 'filters' which has as content
an OrderedCollection(#filterInstalled #filterSafelyAvailable)
for the case at hand, i.e. when both are selected.
This instance variable is accessed by
SMLoaderPlus >>packageListCalculated "Return a list of the SMPackages that should be visible by applying all the filters. Also filter based on the currently selected category - if any." ^ self packages select: [:p | filters allSatisfy: [:currFilter | currFilter isSymbol ifTrue: [(self perform: currFilter) value: p] ifFalse: [self package: p filteredByCategory: (map object: currFilter)]]]
#allSatisfy:
is used which means that this is an 'and' operation.
If it is replaced by
#anySatisfy:
it starts working as intended.
Thank you for fixing this! I put your update into trunk.
Dave
On 9/11/15, Chris Muller asqueaker@gmail.com wrote:
Right, it looks like the filters form a conjunction. Probably intentional, but not necessarily what we still want today. SqueakMap client window could stand to be scrtuinized and improved.
On Fri, Sep 11, 2015 at 3:45 AM, H. Hirzel hannes.hirzel@gmail.com wrote:
Hello
Error report:
If in SqueakMap both options are ticked
'New safely available packages' 'Installed packages'
nothing is shown.
However if I only tick 'Installed packages'
then the installed package is shown. So the selection is not cumulative.
Regards Hannes
Interestingly the method SMLoaderPlus >>packageListCalculated was change last time 9 years ago.
--Hannes
On 9/12/15, David T. Lewis lewis@mail.msen.com wrote:
On Sat, Sep 12, 2015 at 03:47:57PM +0200, H. Hirzel wrote:
The SqueakMap Package Loader window has as model an instance of SMLoaderPlus
And this are the selectors of interest
SMLoaderPlus>>filterInstalled ^[:package | package isInstalled]
SMLoaderPlus>>filterSafelyAvailable ^[:package | package isSafelyAvailable]
SMLoaderPlus has an instance variable called 'filters' which has as content
an OrderedCollection(#filterInstalled #filterSafelyAvailable)
for the case at hand, i.e. when both are selected.
This instance variable is accessed by
SMLoaderPlus >>packageListCalculated "Return a list of the SMPackages that should be visible by applying all the filters. Also filter based on the currently selected category - if any." ^ self packages select: [:p | filters allSatisfy: [:currFilter | currFilter isSymbol ifTrue: [(self perform: currFilter) value: p] ifFalse: [self package: p filteredByCategory: (map object: currFilter)]]]
#allSatisfy:
is used which means that this is an 'and' operation.
If it is replaced by
#anySatisfy:
it starts working as intended.
Thank you for fixing this! I put your update into trunk.
Dave
On 9/11/15, Chris Muller asqueaker@gmail.com wrote:
Right, it looks like the filters form a conjunction. Probably intentional, but not necessarily what we still want today. SqueakMap client window could stand to be scrtuinized and improved.
On Fri, Sep 11, 2015 at 3:45 AM, H. Hirzel hannes.hirzel@gmail.com wrote:
Hello
Error report:
If in SqueakMap both options are ticked
'New safely available packages' 'Installed packages'
nothing is shown.
However if I only tick 'Installed packages'
then the installed package is shown. So the selection is not cumulative.
Regards Hannes
On 09/15/2015 09:17 PM, H. Hirzel wrote:
Interestingly the method SMLoaderPlus >>packageListCalculated was change last time 9 years ago.
Well, when I wrote it I really intended to apply all filters in a logical AND operation :)
But feel free to do whatever you guys find proper.
regards, Göran
squeak-dev@lists.squeakfoundation.org