I have a custom data container object type RowOfPlayerData. When I try to display a RowOfPlayerData object in NSLog, So the system does not know how to display it, so it only shows the address of the object.
I am trying to figure out how I can demonstrate, in an NSLog statement, what is at that address, so I can use the data.
I am trying to create it on a tutorial about NSPredicate:
I did not succeed in describing the type of output but in some way.
I want to explain how I can access the data. Here's the test code I used and I currently have some output. I BTW, I'm new to this.
I really appreciate it if someone can help me to display data in the correct format from PlayerAir because I do not get it.
[CODE]
@ interface roufplayerdata: NSBKem {NSSTING * player name; NSString * Qurgam Type; } @ Property (non-nominal, retained) NSString * playerName; @property (nontomic, raten) nssting * coogam type; - (Zero) addPlayerData2Array; @end
Here is the .m file:
- (zero) addPlayerData2Array {NSLOG (@ ""> AdapterDate 2 Array started Line. CurGameType:% @", line. CurGameType); [PlayerOur object: line]; NSString * xx; Xx = [playerOrgentAntindex: 0]; NSLog (@ "& lt; # 3> PlayerAir:% @", xx);
Output:
addPlayerData2Array started & lt;
2010-09- 25 13: 39: 51.313 x1 [3675: 207]
2010-09-25 13:39: 51.314x1 [3675: 207]
2010-09-25 13:39: 51.314x1 [3675: 207] & lt; # 3> PlayerAmerge:
[/ CODE]
You have a problem here :
[playerArray addObject: row]; NSString * xx; Xx = [playerOrgentAntindex: 0]; NSLog (@ "& lt; # 3> PlayerAir:% @", xx);
line
a is a rougeplayerdata object, not a string @ after the advice of the fictional boy, your
rauplayerdata Add a
description
method to the class and make sure that you get the class while dragging the object out of the Aure.
RAWPlayerData * xx = [playerOur objectAntIndex: 0]; NSLog (@ "& lt; # 3> PlayerAir:% @", xx);
It's being said that everyone, I do not think you are coming right in it. You are calling an example method - (zero) addPlayerData2Array
on an object, but then you are creating a new RowOfPlayerData and returning it to an array form Are there. What you should do:
- (zero) addPlayerData2Array {return [NSArray arrayWithObjects: self.playerName, self.curGameType, zero]; }
If you are calling this method on an object, then you should return the data from that object.
Comments
Post a Comment