I (we) had to revise our orginal idea for developing a mobile application for a website as the site was not compatible with development for X-Code, & more specifically Objective-C language. So we switched gear and built an app for ourselves. This iPhone application (supposed to) log books that you want to read in the future (or authors, subject matter), search it on Amazon and then store it to a list to make it viewable at a latter date. So far we’ve gotten the app to search amazon from the application and open a new web browser with the listing of the book. Below is a picture of the app and its search result:
Q2. How does your program work, in outline?
X-Code (the compiler for Objective-C) builds it’s projects a little differently. In Python or C++, we have our class, struct’s, & functions all in the same document. However, X-Code splits up the delegation of these tasks to individual documents:
We have two programs here essentially: AppDelegate & VeiwController. AppDelegate contains the code for the action that we want the application to perform. AppDelegate is split into .h & .m. .h are the command functions and .m is essentially the main function. Something to note about .m (or the main function), is that like our other two languages, it’s the source for calling all the functions in .h & and any directories that need to be used can be called from here as well.
This is a shot from AppDelegate.m: the @synthesize & @implementation commands are calling our other objective holders. Obejective holders essential have the same definition in Objective-C as they do in Python with the instance of classes: they can contain not only an operation but a type as well, and are bundled together. Another thing to note is the use of void here, where again, like in C++ and Python we don’t want our main function returning anything.
Q3. What did you learn from doing...