Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

donaghy

macrumors member
Original poster
Hi all,

I have an NSMutableArray which contains a MSMutableDictionary (this contains info like Name, Type, etc for each record). I'm tryin to make this array the datasource of a table view. However when i run the app it showing '{' in the table column. This is the method i use to return value into table row:

Code:
- (id) tableView: (NSTableView *) tv 
objectValueForTableColumn: (NSTableColumn *) tableColumn 
			 row: (int) row 
{ 
    NSString *v = [arrayDevices objectAtIndex:row]; 
    return v; 
}

When i 'po' in the console screen the value 'v' its showing this:
{
name = "00 A1";
}

Can anyone tell me how i can return only the value of the object key name?

help appreciated, cheers.
 
This is where i add objects to arrayDevices:

- (void)parser🙁NSXMLParser *)parser didEndElement🙁NSString *)elementName namespaceURI🙁NSString *)namespaceURI qualifiedName🙁NSString *)qName
{
//NSLog(@"ended element: %@", elementName);
if ([elementName isEqualToString😡"Table"])
{
[item setObject:currentName forKey😡"name"];
[arrayDevices addObject:[item copy]];
}
}
 
My guess is that you mean this:

Code:
NSString *v = [[arrayDevices objectAtIndex:row] objectForKey:@"name"];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.