[Pharo-dev] gtinspector deconstructed

Sven Van Caekenberghe sven at stfx.eu
Fri Dec 20 08:27:31 EST 2013

On 19 Dec 2013, at 22:08, Tudor Girba <tudor at tudorgirba.com> wrote:

> SequenceableCollection indexes would be nice. Paging is cool. 
> What do you mean by indexes? The position of an item in the collection?


> I miss an option to go back to less columns, like from 1 to 2 and back to 1, I can’t seem to deselect something in the first one, which would be a way to let the second one disappear again. I hope I am making myself clear ;-)
> Yes, I agree. This is an extension I want for Glamour in general: to grow a pane to fill the window (similar to what happens in Eclipse). This will help you switch between floating navigation mode and more in-depth work mode.

That would be cool.

> We have specialised inspectors for Integer and Float (and maybe some more) standard in Pharo, showing more high level virtual fields, it would be nice if you could implement those as well, maybe as alternative views.
> Certainly. That is the whole idea: create more dedicated presentations to serve dedicated use cases. I do not know the use case for this, but let's make an exercise out of it. Can you tell me what exactly would be interested in seeing? So, if you have an Integer or a Float what code would you like to trigger and have presented?

Some of this got lost when EyeInspector got introduced, here are some screenshots from an older image:

I can think of alternative representations for lots of classes.

> Which brings me to my final question: how do I write simple custom inspectors, given that I am not familiar with Glamour/Moose - that could maybe be another blog post ?
> At the end of the post, there is a "Be moldable" section in which I am hinting at the process. Essentially, you have to extend your object with a method that follows this pattern:
> YourClass>>gtInspectorYourPresentationIn: composite
>      <gtInspectorPresentationOrder: 30>
>      composite "followed by Glamour code to construct presentations"
> The post shows this example:
> RGMethodDefinition>> gtInspectorSendersIn: composite
>      <gtInspectorPresentationOrder: 30>
>      composite list
>           title: 'Senders';
>           display: [ self compiledMethod implementors ] 
> So, to find more examples, simply search for senders of #gtInspectorPresentationOrder: (or just inspect the symbol to see what happens :)), and you will see all extensions in the image.
> I would like to make all presentation tabs to give you the possibility to jump to the implementation so that you can see more examples (like with halos). In any case, I will write another post with some more implementation examples.

Yes, I read everything, and I did some code reading, but I felt a bit helpless ;-)

> Anyway, thanks for pushing this !
> Thanks for looking into it :)
> Sven
> PS: I wonder whether it would be possible to have both types of inspectors/debuggers available at the same time, so that one can switch on the fly, compare them, use one or the other depending on the task ?
> Marcus says that there is an intention of having multiple alternative tools be described via pragmas and be switchable from the settings browser. However, I am not really convinced this is the way to go. I would be more interested in what does not work to make one work smoothly.

I don’t mean switching using a Setting (although that would be good to have too), I meant command-i for normal inspectors, command-shift-i for GT inspectors, or something like that.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131220/5da55c3a/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2013-12-20 at 12.21.31.png
Type: image/png
Size: 35892 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131220/5da55c3a/attachment.png>

More information about the Pharo-dev mailing list