GTInspector Is there a way to see the result of a path query on the element of a collection

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

GTInspector Is there a way to see the result of a path query on the element of a collection

stepharo
Hi


I have a collection of method

and when I inspect them I want to see it + in the next pane the results
of a query.

This was like that in Trippy in VW so can I do that with GTInspector?

Stef


Reply | Threaded
Open this post in threaded view
|

Re: GTInspector Is there a way to see the result of a path query on the element of a collection

Tudor Girba-2
I am not familiar with that Trippy feature, so I need a bit more details.

Do you want to run a query over a collection of methods, like an AST traversal or some sort, and then see the selected methods?

Doru

> On Jun 5, 2016, at 11:05 AM, stepharo <[hidden email]> wrote:
>
> Hi
>
>
> I have a collection of method
>
> and when I inspect them I want to see it + in the next pane the results of a query.
>
> This was like that in Trippy in VW so can I do that with GTInspector?
>
> Stef
>
>

--
www.tudorgirba.com
www.feenk.com

"Value is always contextual."





Reply | Threaded
Open this post in threaded view
|

Re: GTInspector Is there a way to see the result of a path query on the element of a collection

stepharo
Hi doru
> I am not familiar with that Trippy feature,
I will not comment on that.
> so I need a bit more details.
In trippy if you have a collection of Books, if you navigate the first
element to find the author of the contact and you navigate again to find
the name of the author.
Then you can apply such "dynamic query" on all the other elements one by
one and you do not have to dig up/down all the time.
So you previous navigation constitutes a dynamic path that you can apply
to all the current elements.

We could have the same via the navigation.
Now we could have more ie:
if I have an object and I evaluate an expression then I can get a new
pane with the result of the expression like
that I can get all the results of one computation on each of the
elements in one shot.
Easy and powerful to navigate series of objects.
> Do you want to run a query over a collection of methods, like an AST traversal or some sort, and then see the selected methods?
I want the above: set a computation either interactively or
programmatically and see all the results in one shot.
for example if I click on protocol on a method list I want to see all
the protocols.

Class>>#method         |  protocols

Stef

> Doru
>
>> On Jun 5, 2016, at 11:05 AM, stepharo <[hidden email]> wrote:
>>
>> Hi
>>
>>
>> I have a collection of method
>>
>> and when I inspect them I want to see it + in the next pane the results of a query.
>>
>> This was like that in Trippy in VW so can I do that with GTInspector?
>>
>> Stef
>>
>>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "Value is always contextual."
>
>
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: GTInspector Is there a way to see the result of a path query on the element of a collection

Tudor Girba-2
Hi,

On Jun 5, 2016, at 10:28 PM, stepharo <[hidden email]> wrote:

Hi doru
I am not familiar with that Trippy feature,
I will not comment on that.

I do not see what is to comment.

so I need a bit more details.
In trippy if you have a collection of Books, if you navigate the first element to find the author of the contact and you navigate again to find the name of the author.
Then you can apply such "dynamic query" on all the other elements one by one and you do not have to dig up/down all the time.
So you previous navigation constitutes a dynamic path that you can apply to all the current elements.

We could have the same via the navigation.
Now we could have more ie:
if I have an object and I evaluate an expression then I can get a new pane with the result of the expression like
that I can get all the results of one computation on each of the elements in one shot.
Easy and powerful to navigate series of objects.
Do you want to run a query over a collection of methods, like an AST traversal or some sort, and then see the selected methods?
I want the above: set a computation either interactively or programmatically and see all the results in one shot.
for example if I click on protocol on a method list I want to see all the protocols.

Class>>#method         |  protocols

Ok, I think I see what you are referring to now. Indeed, right now a scenario like this is not possible because the navigation is not reified. Reifying the navigation is a goal for the future, but probably in Bloc.

The way I achieve now what you want is to map data on a dictionary:

Object methods collect: [:each | each selector -> each protocol]

And the dictionary offers you the presentation you want.


However this does not work well for all objects because the key must be unique, and some objects do not work well as keys.

If I want to get a preview of a random table I do:

GLMTablePresentation new
column: 'Method' evaluated: [ :each | each selector ];
column: 'Protocol' evaluated: [ :each | each protocol ];
entity: Object methods
and then use the Live tab.


I think we could also use a Matrix and add a table presentation to it.

Is this what you had in mind?

Cheers,
Doru


Stef
Doru

On Jun 5, 2016, at 11:05 AM, stepharo <[hidden email]> wrote:

Hi


I have a collection of method

and when I inspect them I want to see it + in the next pane the results of a query.

This was like that in Trippy in VW so can I do that with GTInspector?

Stef


--
www.tudorgirba.com
www.feenk.com

"Value is always contextual."









--
www.tudorgirba.com
www.feenk.com

"Presenting is storytelling."