-Hi. In this video, we are going to have another look at the Inspector,
and especially how it can create the specific tabs
that we have seen in the last presentation of the Inspector.
I will reuse the example that we defined with the other dictionary,
Time, Date, Morph. And if we look back at the date,
we can see that the time calendar holding the calendar morph
is actually defined if we use a tool called Finder.
Since the Inspector is called the gtInspector,
we will look for gtInspector in the Pragmas.
You can see this pragma called "gtInspectorPresentationOrder".
If I double click on this one,
it will open the different senders of his pragma,
and if I look for a date, we can see that it is called,
within gtInspector, PreviewIn. If I click on this,
you can see that there is the creation of a composite morph
with a title "Calendar", and using the morph "CalendarMorph".
This is how this tab is defined there.
We have got the Calendar title and the CalendarMorph under it.
Now, if we look at other objects such as "Morph new Inspect" and press Cmd+D.
This time, we have got a tab Morph that depicts the actual morph,
and you can see on the right some actions.
"Export as PNG" or "Delete".
We will try to find those there by searching for Morph.
You can see that we have got gtInspectorMorphIn,
and if we look into his code,
we can see that we have got the same composite morph with a title,
and the display of his image,
and error handling if it cannot draw the actual morph.
Then, the two buttons that can be found there,
"Export as PNG" and "Delete", that are defined underneath.
The last one we are going to look at is a compiled method.
We will look at "Point>>#degrees" and press Cmd+I to inspect it.
You can see that this one has several tabs.
It has Bytecode, basically all the instructions sent to the machine.
So, send the instruction ">=", "jumpFalse", "pushConstant".
The Source. This is the actual source code of the method.
The intermediate representation, and an abstract syntax tree.
Those are extremely interesting. What we can do, if I extend this a bit,
we can go to Raw, open another view of a same object,
go to Bytecode on this one, go to Source on this one.
And a nice thing, if I click on, for example, this instruction,
"pushConstant: 0", it will highlight the corresponding piece of source code.
So, this is extremely nice for developers of a compiler
or if you are simply interested in how the bytecode
is translated into the source code and vice versa.
This is interesting and we will look at how it is implemented.
It is implemented under CompiledCode. It is right there.
You can see that we have got the gtInspectorAST
that is implementing the AST tab.
The Bytecode tab is implemented there.
The Bytes, Header, Ir, Pragmas and so on.
Everything is implemented there using the gtInspector presentation order.
This video was there to show you that you can find
how the tabs are implemented
and that the Inspector is really interesting
to display a particular view of the objects that you find.