[Pharo-dev] gtinspector deconstructed
tudor at tudorgirba.com
Thu Dec 19 16:08:36 EST 2013
On Thu, Dec 19, 2013 at 9:29 PM, Sven Van Caekenberghe <sven at stfx.eu> wrote:
> Hi Doru,
> On 19 Dec 2013, at 07:50, Tudor Girba <tudor at tudorgirba.com> wrote:
> > Hi,
> > I took a bit of time to describe how the GTInspector works, what makes
> it different, and to provide hints for several usage scenarios.
> > It's a long post, I know :), but please take a look. As you might know,
> this is the default inspector in the Moose image, but it can also be loaded
> in a fresh Pharo image.
> > I am particularly interested in the following:
> > - if you never used it, and tried it now, what don't you like?
> > - if you used it, was there anything that you did not know?
> > - and of course, what do you like about it?
> > Cheers,
> > Doru
> > --
> > www.tudorgirba.com
> > "Every thing has its own flow"
> I read the blog post and installed the code in my working Pharo 3 image.
> First off, I like the debugger, it feels polished,
Thanks. The debugger is particularly interesting when you get into
supported specific cases. But, already Andrei and Alex worked on a cool
extension for the debugger that highlights on the stack the entries that
come from the same class or from the same package. This is quite educating.
Both debugging and inspecting are so under developed that we have a ton of
potential in front of us. But, let's talk about this in a separate thread
> and I like the inspector, it is quite interesting. The clear tables for
> instance variables names and values and dictionary keys and values are much
> 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
> 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?
> 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:
composite "followed by Glamour code to construct presentations"
The post shows this example:
RGMethodDefinition>> gtInspectorSendersIn: composite
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
> Anyway, thanks for pushing this !
Thanks for looking into it :)
> 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.
But, besides the Float and Integer views, do you happen to have something
else that you cannot do as easily with the GTInspector?
> Sven Van Caekenberghe
> Smalltalk is the Red Pill
"Every thing has its own flow"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-dev