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

H. Hirzel hannes.hirzel at gmail.com
Tue Sep 15 19:17:32 UTC 2015


Interestingly the method SMLoaderPlus >>packageListCalculated was
change last time 9 years ago.

--Hannes

On 9/12/15, David T. Lewis <lewis at 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 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