Hi all,
In my aplication, I have an nsmutablearray which stores a number of types of objects. All these objects are having two similar properties: id, type.
What I'm doing is I'm fetching the current working object in a 1-element array and accessing its properties id, type from within another class. This class is not aware which type of an object is the current object. How shall I access this object?
I tried doing:
commentId = [[appDelegate.currentDeailedObject valueForKey:@"id"] intValue];
commentType = [appDelegate.currentDeailedObject valueForKey:@"type"];
But it didn't work.
I created an object of type id like this:
id *anObject = [appDelegate.currentDeailedObject objectAtIndex:0];
commentId = [[anObject valueForKey:@"id"] intValue];
commentType = [anObject valueForKey:@"type"];
But it shows me 2 warnings: 1.warning: initialization from incompatible pointer type
2.warning: invalid receiver type 'id*'
How shall I make this work?
Thanx in advance.