SqueakMap error -- display of installed packages

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

SqueakMap error -- display of installed packages

Hannes Hirzel
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



SqueakMap_Package_list_empty_error_condition.png (58K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: SqueakMap error -- display of installed packages

Chris Muller-3
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 <[hidden email]> 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
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: SqueakMap error -- display of installed packages

Hannes Hirzel
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 <[hidden email]> 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 <[hidden email]> 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
>>
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: SqueakMap error -- display of installed packages

David T. Lewis
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 <[hidden email]> 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 <[hidden email]> 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
> >>
> >>
> >>
> >
> >

Reply | Threaded
Open this post in threaded view
|

Re: SqueakMap error -- display of installed packages

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

--Hannes

On 9/12/15, David T. Lewis <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
>> > 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
>> >>
>> >>
>> >>
>> >
>> >
>
>

Reply | Threaded
Open this post in threaded view
|

Re: SqueakMap error -- display of installed packages

Göran Krampe
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