I'm having trouble with section 4 of the stanford iphone class on assignment 1b.
I am having trouble understanding how I will build the array and what the assignment expects.
Should the array be a "global" variable? Where should I define that? Will each of the other subfunctions add their variables to the array? Is the PrintIntrospectionInfo function just there to enumerate through and print all introspective info?
Where can I read up on the things they are asking for in this assignment? What should I read up on?
I'm not taking the class so can someone send me their code? The lessons build up on each other and I want to be able to proceed.
Here's the assignment :
Objective-C has a number of facilities that add to its dynamic object-oriented capabilities. Many of these facilities deal with determining and using an object's capabilities at runtime. Create a mutable array and add objects of various types to it. Create instance of the classes we’ve used elsewhere in this assignment to populate the array: NSString, NSURL, NSProcessInfo, NSDictionary, etc. Create some NSMutableString instances and put them in the array as well.
Feel free to create other kinds of objects also.
Iterate through the objects in the array and do the following: 1. Print the class name of the object. 2. Log if the object is member of class NSString. 3. Log if the object is kind of class NSString. 4. Log if the object responds to the selector "lowercaseString". Page 5 of 6 5. If the object does respond to the lowercaseString selector, log the result of asking the object to perform that selector (using performSelector:) CS193P Assignment 1B Spring 2009 Doll/Cannistraro