2017-09-24 9:30 GMT+02:00 Stephane Ducasse <stepharo.self@gmail.com>:
What is the relationship between a cursor and ClyEnvironmentContent
and ClyEnvironment?

If you are asking about ClyNavigationEnvironment then it is kind of facade to query the system. It is responsible to select specific scope of environment. And it maintains cache for them.

scope := ClySystemNavigationEnvironment selectScope: ClyPackageScope of: {Object package}
��
Concrete kind of environment represents concrete kind of system. ClySystemNavigationEnvironment represents general Pharo system.��

With scope you evaluate queries:

cursor := scope query: (ClyMessageSenders of: #(do:)_.

And cursor provides enumeration interface to items of query result where result itself is an instance of concrete type of ClyEnvironmentContent.

So cache of ClyNavigationEnvironment has multiple scopes. Every scope instance has cache of multiple ClyEnvironmentContent instances.
Each content knows in what scope it was built and what environment it represents (and also what query built it).
Cursor instance references single environment content instance. You can have multiple cursors which point to same environment content instance.��

Is it clear?


On Sun, Sep 24, 2017 at 9:16 AM, Stephane Ducasse
<stepharo.self@gmail.com> wrote:
> On Sat, Sep 23, 2017 at 10:56 AM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
>>
>>>>
>>>> another question
>>>>
>>>> packageScope query: (ClyMessageSenders of: #(do: x))
>>>>
>>>> It is returning all the senders of do: and the senders of x
>>>> or
>>>> returning all the sender of do: and x
>>>
>>>
>>> It returns methods which sent #do: or #x
>>
>>
>> This logic was needed to support "Senders button" when multiple methods are
>> selected. I think it is expected behaviour in that case.
>
> Yes but this is not when you read the code
>
> packageScope query: (ClyMessageSenders of: #(do: x))
>
>
> packageScope query: (ClyMessageSenders anyOf: #(do: x))
>
> is much clearer because it means what it does.
>
>
> stef
>
> One day you should try to write documentation on something that you
> should reverse engineer first and you will see.
> Nothing is clear.
>
>
>>
>>>
>>>
>>>>
>>>>
>>>>
>>>> Stef
>>>>
>>>
>>