yego.me
💡 Stop wasting time. Read Youtube instead of watch. Download Chrome Extension

Mac Programming Lesson 3 part 3


2m read
·Nov 3, 2024

Okay, so now that this is ready, we're going to do our final step entries text. I believe set string value and now we're going to set it to new text. If you remember, new text is an NS string that will have all the entries, and we keep on appending the next entry to it, so it will have all the entries.

So now finally we're going to do interface builder stuff in it all up. I'm going to open the xib; interface Builder will now pop open, and I'm going to drag an NS object into our document window. Just do that by going here, and then under the class, I'm going to set it to be app controller.

So now for this, I'm going to drag on a simple, I think I'll do a multi-line label for this, which is in fact an NS text field. I'm going to drag on a button—who knows why the button is so small? Okay, now we're going to say generate. Close, so we're going to drag it to app controller. Click, hold control and drag it to app controller and click generate new numbers.

And we're going to click from app controller. Control click from app controller and link it up with entries text, and now everything will work wonderfully. So hopefully we'll see a success here, generate, and here are all our entries.

Now, if you take a look, all these dates are exactly the same. What I would like it to do is just continuously keep on incrementing the date by 7 days, and it's not that difficult to do. So what we're going to do is right here when we say entry date equals Etc., we're going to say the day is this + 7, and that's pretty easy.

So now, like we're we keep on adding seven to the day, and then we'll just keep on increasing. So there we go, and it's like a perfect lottery. So every week we have a new set of numbers, and now I can cheat because I know all the numbers. No, but this is pretty cool.

You can do all the interface builder stuff you want to polish this up, but this is really, in my opinion, a good learning experience. Now it is very—like we learned so much new stuff today. I think what you guys should do is ask me all your questions, so in a personal message or whatever, just send me every single question you have, and I'll try to answer you as soon as possible.

So, um, anyway, thanks for watching. Mids and one—subscribe, tell us all your problems or questions, and goodbye.

More Articles

View All
Car buying unit overview | Teacher resources | Financial Literacy | Khan Academy
Hi teachers, Welcome to the unit on car buying. Now, car buying—or leasing, I should say—getting a car somehow is something that most people have to do at least once in their life. The goal of this unit is to help your students navigate that process. Fi…
The past tense | The parts of speech | Grammar | Khan Academy
Hello friends and welcome to the distant past! Because today we’re talking about the past tense, which refers to stuff that has already happened. There are many ways to form the past tense, but for right now, I just want to focus on the basic version, wh…
Verifying inverse functions from tables | Precalculus | Khan Academy
We’re told the following tables give all of the input-output pairs for the functions s and t. So we see this first table here, we have some x’s, and then they tell us what the corresponding s of x is. Then, in this table, we have some x’s, and they tell u…
The Worth of Water | National Geographic
You know, there’s a saying: even if you are next to a river of water, save each drop because you don’t know whether there will be a drop tomorrow. The more people on Earth, the less available water we’re going to have to drink. The most important thing is…
BULLET TIME FAIL (Slowmo) - Smarter Every Day 101
Surprised you had it running at full speed. Hey, it’s me, Destin. Welcome back to Smarter Every Day. This is Mark Rober. Mark is using me. Is this true or false? - [laugh] - Mark is using me to access your subscribers. I’m not really happy about this, Mar…
Primary Elections Explained
Primary elections are how political parties in the United States pick their strongest candidate to run for president. The parties do this by holding mini-elections in each of the states, and the candidates with the most votes from these elections become t…