1
00:00:01,920 --> 00:00:07,680
OK, so we've created a menu thing to add songs, now we want to create one next to it to delete songs.

2
00:00:07,690 --> 00:00:11,640
So let's head back over to our code and let's head down to the bottom.

3
00:00:11,640 --> 00:00:17,790
And here is where we created our menu things.

4
00:00:18,300 --> 00:00:25,110
So let's also create the lead song menu drop downs.

5
00:00:26,780 --> 00:00:34,250
All right, so let's call this remove underscore song, underscore menu, and that's going to be a menu

6
00:00:34,250 --> 00:00:36,610
widget and we want to put it in my menu.

7
00:00:38,030 --> 00:00:41,290
Remember, that's our main menu that we created, right?

8
00:00:41,810 --> 00:00:43,550
It's called the main menu.

9
00:00:44,000 --> 00:00:44,430
Right.

10
00:00:44,780 --> 00:00:48,830
OK, and so let's go my underscore menu.

11
00:00:50,060 --> 00:00:51,800
Add underscore Kaskade.

12
00:00:53,370 --> 00:00:58,410
It's like we did earlier right here, and we want to give this a label, remember, this is lowercase

13
00:00:58,410 --> 00:01:02,250
L and let's say remove songs.

14
00:01:04,330 --> 00:01:11,470
Right, and we want to say, put this on the menu equals this little menu, this is like submenu we

15
00:01:11,470 --> 00:01:12,220
just created.

16
00:01:14,350 --> 00:01:18,430
All right, so let's go out and save this and run it just to make sure that worked.

17
00:01:20,820 --> 00:01:27,510
And we see now we have this removed songs and there's not actually anything there right now, so, OK.

18
00:01:28,230 --> 00:01:30,480
And remember, we added this tarof thing.

19
00:01:30,480 --> 00:01:34,660
So if we want to add this same thing, we could put this right there.

20
00:01:34,710 --> 00:01:36,240
So get rid of that tarof thing.

21
00:01:36,480 --> 00:01:38,870
OK, so let's add a couple of commands here.

22
00:01:38,880 --> 00:01:40,740
So let's go remove.

23
00:01:42,100 --> 00:01:46,180
Underscore song, underscore menu and underscore command.

24
00:01:47,780 --> 00:01:57,980
And let's give this a label and let's say delete a song from a playlist, right, and let's give this

25
00:01:57,980 --> 00:02:01,540
a command equal delete underscore song.

26
00:02:02,390 --> 00:02:05,900
And I'm just going to copy this whole thing and paste it in again.

27
00:02:06,140 --> 00:02:16,010
And instead of deleting one song from the playlist, let's delete all songs from playlist and let's

28
00:02:16,010 --> 00:02:20,800
give this a command of delete, underscore all underscore songs.

29
00:02:21,080 --> 00:02:24,260
So now we need to create these two functions just like we did earlier.

30
00:02:24,260 --> 00:02:31,280
So let's come back up to the top here and kind of scroll down and create a comment that says Create

31
00:02:31,670 --> 00:02:37,790
function to delete one song from playlist.

32
00:02:39,500 --> 00:02:42,410
And let's go define the song.

33
00:02:43,550 --> 00:02:48,530
And we just want to pass now, we want to do the same thing for the other one, so create a function

34
00:02:48,530 --> 00:02:50,660
to delete all.

35
00:02:52,000 --> 00:02:58,930
Songs, and this one was called Delete, underscore all underscore songs and we can pass, so let's

36
00:02:58,930 --> 00:03:03,700
go and save this and run this guy just to see if these look correct.

37
00:03:03,940 --> 00:03:08,560
So remove songs, we can delete a song, we can delete all songs.

38
00:03:08,560 --> 00:03:09,630
And that looks pretty good.

39
00:03:10,300 --> 00:03:15,340
So now we need to actually write out the functions to delete a song or to delete all the songs.

40
00:03:15,460 --> 00:03:17,050
And then we'll do that in the next video.
