Mac Programming Lesson 3 part 3
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.