"Advanced Spotter actions"
Quentin Ducasse.
-Hi. In this video, we are going to have another look at the Spotter.
The Spotter can be accessed either by going to Tools, then Spotter
or hitting Shift+Enter.
From within the Spotter, you can have access to the menu, the different tools,
anything, but you can look for, for example, class Point.
If I go over to Point and press Enter,
it will open the system browser on the correct class and package.
But another thing you can do is, if I go back to Point,
if I now would like to dive into this class,
I can press the blue arrow.
Another thing I can do is toggle the preview,
so pressing Cmd+P or clicking on this gray arrow.
Cmd+P will toggle the preview on this browser.
If I press this blue arrow or press Cmd+Right,
Cmd+Right will dive into the Point class.
I have different categories: Instance methods, Super instance methods,
Class methods. I can look into them by using "#instance", for example.
I will only have the Instance methods or the Instance variables.
If I want to dive into this method there,
I can just press Cmd+Right, or I can dive into all the Instance methods
using Cmd+Shift+Right.
This will bring me to all the Instance methods, reflectedAbout.
I have a preview on the right.
And if I am not interested in all of these methods,
I can simply press Cmd and go back on the left to go back to the beginning.
So, Point, Spotter, and I am back here.
Now, another thing that is nice with the Spotter
is that if I write something to the Playground, for example,
if I write "Date today". I print it and we are the 10th of May 2020.
If I shut this window, now what I can do is go back to the Spotter, Shift+Enter,
and you can see the history there. We can go by scrolling,
but if I write "#Playground", you can see there #Playground named pages,
#Playground cached pages. So, for example, here,
we can press Enter on this #Playground cached pages,
and it will open a Playground with the last piece of code that was written.
So, it can help you if you forgot what you had in your Playground
before closing it. It can help you handle it.
Finally, if you are from within the Spotter,
you can go into your file system by using "./".
Right there, we are in the file system and I will enter any of the directories
or mounted shells. So, I will just type "#files".
Those are all the files around my image. You can see that there is my image here,
"W5-LiveA.image", and we can go over to the jpg, for example.
This will open the image. Another thing that we can do is...
If I go back to "#files", there is a zip document
and I can go into it by pressing Cmd+Right.
This will make me go into it, see it. I can see there is another jpg.
You can see that there is a text file that I can get a preview from.
I can open the jpg by simply pressing Enter.
The Spotter can really help you explore both the internal system of Pharo
and the external system around it
if you need to access some external documents.
I really encourage you to use it.
It is much easier if you learn the shortcuts.
Cmd+Right to dive into, toggle the preview,
or Cmd+Left to come back.