title: ObC: How to convert a memory pointer to dataP
body: <p>I have a custom data container object of type RowOfPlayerData. When I try to display a RowOfPlayerData object in NSLog, the system doesn't know how to display it, so it just shows the address of the object.</p>
  
  <p>I am trying to figure out how i can display, in an NSLog statement, what is at that address so i can use the data.</p>
  
  <p>I am trying to build this on a tutorial about NSPredicate: <a href="http://doronkatz.com/how-to-do-amazingly-simple-searches-with-nsar" rel="nofollow">http://doronkatz.com/how-to-do-amazingly-simple-searches-with-nsar</a></p>
  
  <p>I have tried to do some sort of description of the output but not succeded.</p>
  
  <p>I have tried to figure out how to do this so i can access the data. Here is the test code i have used and some output i currently have. BTW, i am new to this.</p>
  
  <p>I would really appreciate if someone could help me display the data from the playerArray in the right format as i just don't get this.</p>
  
  <p>[CODE]</p>
  
  <pre><code>@interface RowOfPlayerData : NSObject {
  
      NSString    *playerName;
      NSString    *curGameType;
  }
  
  @property(nonatomic, retain)    NSString    *playerName;
  
  @property (nonatomic, retain)   NSString    *curGameType;
  
  -(void)addPlayerData2Array;
  
  @end
  </code></pre>
  
  <p>here is the .m file:</p>
  
  <pre><code>-(void)addPlayerData2Array {
  
  
      NSLog(@"&gt;&gt;addPlayerData2Array started&lt;&lt;");
      NSMutableArray *playerArray = [[NSMutableArray alloc] init];
      RowOfPlayerData *row;
      row = [[RowOfPlayerData alloc] init];
      row.playerName = @"Player1";
      row.curGameType = @"NORMAL1";
      NSLog(@"&lt;#1&gt; row.playerName: %@", row.playerName);
      NSLog(@"&lt;#2&gt; row.curGameType: %@", row.curGameType);
      [playerArray addObject:row]; 
      NSString *xx;
      xx = [playerArray objectAtIndex:0];
  
      NSLog(@"&lt;#3&gt; playerArray: %@", xx);
  </code></pre>
  
  <p>Output:</p>
  
  <blockquote>
    <blockquote>
      <p>addPlayerData2Array started&lt;&lt;</p>
    </blockquote>
  </blockquote>
  
  <p>2010-09-25 13:39:51.313 x1[3675:207] &lt;#1> row.playerName: Player1</p>
  
  <p>2010-09-25 13:39:51.314 x1[3675:207] &lt;#2> row.curGameType: NORMAL1</p>
  
  <p>2010-09-25 13:39:51.314 x1[3675:207] &lt;#3> playerArray: </p>
  
  <p>[/CODE]</p>