GTInspector sorting not comparable

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

GTInspector sorting not comparable

Yuriy Tymchuk-2
Hi guys.

I’ve encountered an error that occurs when we are displaying for example dict in GTInspector. There is very nice functionality which sorts items according to one column

column: 'Key'
                        evaluated: [:each | GTObjectPrinter new asTruncatedTextFrom: each key ]
                        sortedBy: [:x :y | x > y ];

but not all objects know how to respond to #>.

Any ideas how to solve this in a mic way?
Uko
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: GTInspector sorting not comparable

Andrei Chis
Yes, that's a problem. Right now the sorting block receives the objects that are displayed and not the string representation that is actually displayed in a column.
As a solution we could make it so by default a column is sortable by the text representation that is being displayed. The sorting block could then be used 
only if a different type of sorting is needed.

What do you think?

Cheers,
Andrei


On Fri, May 23, 2014 at 11:23 AM, Yuriy Tymchuk <[hidden email]> wrote:
Hi guys.

I’ve encountered an error that occurs when we are displaying for example dict in GTInspector. There is very nice functionality which sorts items according to one column

column: 'Key'
                        evaluated: [:each | GTObjectPrinter new asTruncatedTextFrom: each key ]
                        sortedBy: [:x :y | x > y ];

but not all objects know how to respond to #>.

Any ideas how to solve this in a mic way?
Uko
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: GTInspector sorting not comparable

Uko2
Makes sense. Are you able to implement this?

Uko

On 23 May 2014, at 11:47, Andrei Chis <[hidden email]> wrote:

Yes, that's a problem. Right now the sorting block receives the objects that are displayed and not the string representation that is actually displayed in a column.
As a solution we could make it so by default a column is sortable by the text representation that is being displayed. The sorting block could then be used 
only if a different type of sorting is needed.

What do you think?

Cheers,
Andrei


On Fri, May 23, 2014 at 11:23 AM, Yuriy Tymchuk <[hidden email]> wrote:
Hi guys.

I’ve encountered an error that occurs when we are displaying for example dict in GTInspector. There is very nice functionality which sorts items according to one column

column: 'Key'
                        evaluated: [:each | GTObjectPrinter new asTruncatedTextFrom: each key ]
                        sortedBy: [:x :y | x > y ];

but not all objects know how to respond to #>.

Any ideas how to solve this in a mic way?
Uko
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: GTInspector sorting not comparable

Tudor Girba-2
In reply to this post by Andrei Chis
Yes, that should be the default behavior.

Doru


On Fri, May 23, 2014 at 11:47 AM, Andrei Chis <[hidden email]> wrote:
Yes, that's a problem. Right now the sorting block receives the objects that are displayed and not the string representation that is actually displayed in a column.
As a solution we could make it so by default a column is sortable by the text representation that is being displayed. The sorting block could then be used 
only if a different type of sorting is needed.

What do you think?

Cheers,
Andrei


On Fri, May 23, 2014 at 11:23 AM, Yuriy Tymchuk <[hidden email]> wrote:
Hi guys.

I’ve encountered an error that occurs when we are displaying for example dict in GTInspector. There is very nice functionality which sorts items according to one column

column: 'Key'
                        evaluated: [:each | GTObjectPrinter new asTruncatedTextFrom: each key ]
                        sortedBy: [:x :y | x > y ];

but not all objects know how to respond to #>.

Any ideas how to solve this in a mic way?
Uko
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: GTInspector sorting not comparable

Andrei Chis
I don't have time today, but I'll have a look over it during the weekend.
It shouldn't be so difficult to implement :)

Andrei


On Fri, May 23, 2014 at 12:03 PM, Tudor Girba <[hidden email]> wrote:
Yes, that should be the default behavior.

Doru


On Fri, May 23, 2014 at 11:47 AM, Andrei Chis <[hidden email]> wrote:
Yes, that's a problem. Right now the sorting block receives the objects that are displayed and not the string representation that is actually displayed in a column.
As a solution we could make it so by default a column is sortable by the text representation that is being displayed. The sorting block could then be used 
only if a different type of sorting is needed.

What do you think?

Cheers,
Andrei


On Fri, May 23, 2014 at 11:23 AM, Yuriy Tymchuk <[hidden email]> wrote:
Hi guys.

I’ve encountered an error that occurs when we are displaying for example dict in GTInspector. There is very nice functionality which sorts items according to one column

column: 'Key'
                        evaluated: [:each | GTObjectPrinter new asTruncatedTextFrom: each key ]
                        sortedBy: [:x :y | x > y ];

but not all objects know how to respond to #>.

Any ideas how to solve this in a mic way?
Uko
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: GTInspector sorting not comparable

Uko2
Thank you, Andrei

On 23 May 2014, at 12:15, Andrei Chis <[hidden email]> wrote:

I don't have time today, but I'll have a look over it during the weekend.
It shouldn't be so difficult to implement :)

Andrei


On Fri, May 23, 2014 at 12:03 PM, Tudor Girba <[hidden email]> wrote:
Yes, that should be the default behavior.

Doru


On Fri, May 23, 2014 at 11:47 AM, Andrei Chis <[hidden email]> wrote:
Yes, that's a problem. Right now the sorting block receives the objects that are displayed and not the string representation that is actually displayed in a column.
As a solution we could make it so by default a column is sortable by the text representation that is being displayed. The sorting block could then be used 
only if a different type of sorting is needed.

What do you think?

Cheers,
Andrei


On Fri, May 23, 2014 at 11:23 AM, Yuriy Tymchuk <[hidden email]> wrote:
Hi guys.

I’ve encountered an error that occurs when we are displaying for example dict in GTInspector. There is very nice functionality which sorts items according to one column

column: 'Key'
                        evaluated: [:each | GTObjectPrinter new asTruncatedTextFrom: each key ]
                        sortedBy: [:x :y | x > y ];

but not all objects know how to respond to #>.

Any ideas how to solve this in a mic way?
Uko
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev