1 00:00:00,040 --> 00:00:00,080 "Advanced Spotter actions" 2 00:00:00,120 --> 00:00:00,160 Quentin Ducasse. 3 00:00:04,080 --> 00:00:07,280 -Hi. In this video, we are going to have another look at the Spotter. 4 00:00:07,600 --> 00:00:12,120 The Spotter can be accessed either by going to Tools, then Spotter 5 00:00:12,440 --> 00:00:14,040 or hitting Shift+Enter. 6 00:00:14,360 --> 00:00:19,400 From within the Spotter, you can have access to the menu, the different tools, 7 00:00:19,960 --> 00:00:24,680 anything, but you can look for, for example, class Point. 8 00:00:25,000 --> 00:00:27,680 If I go over to Point and press Enter, 9 00:00:28,000 --> 00:00:31,520 it will open the system browser on the correct class and package. 10 00:00:31,840 --> 00:00:34,840 But another thing you can do is, if I go back to Point, 11 00:00:35,160 --> 00:00:38,560 if I now would like to dive into this class, 12 00:00:38,880 --> 00:00:40,960 I can press the blue arrow. 13 00:00:41,400 --> 00:00:43,840 Another thing I can do is toggle the preview, 14 00:00:44,160 --> 00:00:47,200 so pressing Cmd+P or clicking on this gray arrow. 15 00:00:47,520 --> 00:00:50,200 Cmd+P will toggle the preview on this browser. 16 00:00:50,520 --> 00:00:55,440 If I press this blue arrow or press Cmd+Right, 17 00:00:55,760 --> 00:01:00,040 Cmd+Right will dive into the Point class. 18 00:01:00,360 --> 00:01:04,640 I have different categories: Instance methods, Super instance methods, 19 00:01:04,960 --> 00:01:11,320 Class methods. I can look into them by using "#instance", for example. 20 00:01:11,640 --> 00:01:15,680 I will only have the Instance methods or the Instance variables. 21 00:01:16,000 --> 00:01:19,560 If I want to dive into this method there, 22 00:01:19,880 --> 00:01:24,040 I can just press Cmd+Right, or I can dive into all the Instance methods 23 00:01:24,360 --> 00:01:26,200 using Cmd+Shift+Right. 24 00:01:26,520 --> 00:01:30,040 This will bring me to all the Instance methods, reflectedAbout. 25 00:01:30,360 --> 00:01:31,800 I have a preview on the right. 26 00:01:32,120 --> 00:01:34,800 And if I am not interested in all of these methods, 27 00:01:35,120 --> 00:01:39,000 I can simply press Cmd and go back on the left to go back to the beginning. 28 00:01:39,320 --> 00:01:42,080 So, Point, Spotter, and I am back here. 29 00:01:42,400 --> 00:01:44,360 Now, another thing that is nice with the Spotter 30 00:01:44,680 --> 00:01:47,560 is that if I write something to the Playground, for example, 31 00:01:47,880 --> 00:01:54,000 if I write "Date today". I print it and we are the 10th of May 2020. 32 00:01:54,320 --> 00:02:01,640 If I shut this window, now what I can do is go back to the Spotter, Shift+Enter, 33 00:02:01,960 --> 00:02:07,160 and you can see the history there. We can go by scrolling, 34 00:02:07,480 --> 00:02:12,120 but if I write "#Playground", you can see there #Playground named pages, 35 00:02:12,440 --> 00:02:15,240 #Playground cached pages. So, for example, here, 36 00:02:15,560 --> 00:02:18,480 we can press Enter on this #Playground cached pages, 37 00:02:18,800 --> 00:02:22,200 and it will open a Playground with the last piece of code that was written. 38 00:02:22,520 --> 00:02:25,640 So, it can help you if you forgot what you had in your Playground 39 00:02:25,960 --> 00:02:27,960 before closing it. It can help you handle it. 40 00:02:28,280 --> 00:02:30,600 Finally, if you are from within the Spotter, 41 00:02:30,920 --> 00:02:35,200 you can go into your file system by using "./". 42 00:02:35,520 --> 00:02:40,720 Right there, we are in the file system and I will enter any of the directories 43 00:02:41,040 --> 00:02:43,840 or mounted shells. So, I will just type "#files". 44 00:02:44,160 --> 00:02:49,920 Those are all the files around my image. You can see that there is my image here, 45 00:02:50,240 --> 00:02:56,240 "W5-LiveA.image", and we can go over to the jpg, for example. 46 00:02:56,560 --> 00:03:00,000 This will open the image. Another thing that we can do is... 47 00:03:00,600 --> 00:03:05,520 If I go back to "#files", there is a zip document 48 00:03:05,840 --> 00:03:08,720 and I can go into it by pressing Cmd+Right. 49 00:03:09,400 --> 00:03:13,680 This will make me go into it, see it. I can see there is another jpg. 50 00:03:14,000 --> 00:03:17,600 You can see that there is a text file that I can get a preview from. 51 00:03:17,920 --> 00:03:19,800 I can open the jpg by simply pressing Enter. 52 00:03:20,120 --> 00:03:25,160 The Spotter can really help you explore both the internal system of Pharo 53 00:03:25,480 --> 00:03:28,200 and the external system around it 54 00:03:28,520 --> 00:03:31,480 if you need to access some external documents. 55 00:03:31,800 --> 00:03:33,440 I really encourage you to use it. 56 00:03:33,760 --> 00:03:35,720 It is much easier if you learn the shortcuts. 57 00:03:36,040 --> 00:03:40,240 Cmd+Right to dive into, toggle the preview, 58 00:03:40,560 --> 00:03:42,320 or Cmd+Left to come back.