[squeak-dev] SqueakMap error -- display of installed packages

H. Hirzel hannes.hirzel at gmail.com
Sat Sep 12 13:47:57 UTC 2015


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 at 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 at 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
>>
>>
>>
>
>


More information about the Squeak-dev mailing list