Friday, February 15, 2008
XCode 3
Ok so I'm having a little bit of difficulty working through this tutorial. The problem is that the tutorial, and nearly all of the associated documentation about Objective-C, was created using XCode 2. So when I am trying to follow along with XCode 3, there are many differences between the two. The programs are basically the same, but I've found some large differences that make it difficult to follow along. So much of my time is being spent trying to figure out how to do a task they describe in the tutorial a different way in XCode 3. The first problem I encountered was with creating classes. In the Interface Builder I had to create a ConverterController class that would connect the visual elements (Text fields, words, buttons, etc.) with the Converter class that would do the operation of actually converting the numbers and giving a result. There is a simple Class window pane in XCode 2 that you select and then click on "New Class", this pane is not present in XCode 3. I did manage to figure out how to create a new class in XCode 3, which has a Library of objects and you can select a generic NSObject from that and then define it further to create a new class. I am now trying to figure out how to connect this class I have made with the interface that I created earlier, because the methods for doing this are different than the tutorial shows.
Tuesday, February 12, 2008
Currency Converter
Ok so I finished the technology overview. Now I'm reading a brief tutorial of how to make a Currency Converter. It goes over the basics of using XCode and Interface Builder, which is Apple's program to make windows and the user interface in an application. I've started making the very basics of an application by setting up a window with Interface Builder. So far I havn't used any Objective-C or code because I am just working with the interface. It shouldn't take too long to finish the Currency Converter and then I'll have something that actually functions as an application. It seems like the Apple tools are very useful and comprehensive so I don't actually have to do too much coding to make a simple application. Most of it is visually made. For instance, to make a text field object that is the result of a conversion done in another class, I don't have to write any code, but simply do a visual drag and drop of a method that connects the results of the class to the selected object.
Monday, February 11, 2008
Mac OS X Technologies
I decided to read the Mac OS X Technology Overview. It is an overview of the technologies and systems that Mac OS X uses. I don't understand it all, but it is giving me a good overview of what I am going to be working with when I program with Objective-C. I read about the underlying frameworks and the Mach kernel. There are several Core frameworks that I will be using, such as Core Image to create the windows in my applications and display everything that I will need. I am almost finished reading through that and then I will go back to the Objective-C document and begin trying out some applications myself.
Classes
So I've continued reading about Objective-C 2.0. Right now I'm learning about classes. A class is what defines an object and creates an instance of it. Every class has its own class object, which is an object that is used to create new instances of the class. It contains all of the information about the class and how the objects the class creates are going to behave.
Monday, February 4, 2008
XCode
I just got XCode 3. I had to install it and get it setup so I can now use it to program in Objective-C 2.0. XCode is the programming application for Mac OS X. I'll now be able to use it to actually make sample programs using Objective-C. I have to go through some of the basics of using XCode first, but that shouldn't be too difficult. I'm going to read a little further into Objective-C and then start playing around with XCode to see what I can do with it.
Friday, February 1, 2008
Polymorphism
I'm reading through a PDF on Objective-C 2.0 that I got from the Apple Developer Website. You have to be an ADC member to view their documents though. It's like a couple hundred pages though, so it should be a thorough overview of the language. I can't actually write any code until I get XCode, though, so I have to wait on that before I start developing examples. So right now I'm just reading through the documentation. With polymorphism any method that you call on an object such as display could do something different depending on which object it was invoked on. So if I sent display to an object Square it would call the method display in Square, but this would be a different method than if I called display on the object Circle because a circle would not necessarily be displayed in the exact same way. So with polymorphism any object could be called to display itself in whatever way it needs to all with the same method call.
Subscribe to:
Posts (Atom)