While reading the book by Mr. Kochan (1st ed): "Programming in Objective C" , I noticed that he uses the following code (you can see it at pages 342-344) to explain that the initWithString is preferable to stringWithString because the AddressCard class would own the name variable contents. Also, I don’t get any errors making repeated calls to the setName version with the stringWithString method. //I didn't added here the header file which has the needed declarations #import "AddressCard.h" @implementation AddressCard; -(NSString *) name{ return name; } //Recommended code: -(void) setName: (NSString *) theName{ [name release] name = [[NSString […]
Category: CSCW Lab- iPhone
My latest task in CSCW Lab was to create the parser class for parsing some huge and multilevel XML. All nice and easy at first sight. Since the XML was the result of an RPC call, I got back some structures corresponding to NSDictionary and some arrays corresponding to NSArray in Apple's Objective-C.
While start XCoding, I faced a new challenge : how to create modal, single use confirmation dialogs? So after some digging in the internet, I found out that this can be actually done pretty simple and elegant. This will be very useful if you want to display some deletion confirmation or ask for user permission to use the camera or GPS sensor. All you have to do is just create a UIAlert and the IBAction hooked up to your “Nuclear launch” button, and then have its delegate decide whether to destroy the world or not. In the header file you […]
Solving the problem: no matter what I did, the UIImageView didn’t load the image. After some digging on the Internet about this, I found out that first thing to look for is whether you're sending the setImage message to the UIImageView instance you expect.
Don’t be fooled that Objective-C is a Object oriented language. For decades operators overloading is something standard in almost all of them. But in Objective-C you don’t have it. Mostly, I believe that comes from the struggle of Apple guys to assure the stability of the system. A lot of errors can come from poorly designed overloads, thus the crashes can appear.
This is the start of all iPhone Developers. It will be an extremely brief tutorial meant just for those which are at the absolute start of iPhone development. First checks: 1. System requirements: verify if the iPhone sdk needs are met. 2. Go to Apple’s iPhone Developer Center , then download the SDK. 3. As you’ll need some experience and code to work on, download the Hello World sample application. 4. Double click (gotcha!) on the the Hello World project file (the .xcodeproj). 5. Alternatively, you can use the research assistant to increase your knowledge about the iPhone libraries. 6. […]
I just started the most interesting lab of my life : Programming Apple’s iPhone using a MacBook with Cocoa Touch. It is held in Frauhover FIT, under Prof. Dr. Wolfgang Prinz and Dr. Wolfgang Gräther. In this lab we will start develop an iPhone application using Usability principles, Apple’s User interface Guides.