On 4 Nov 2008, at 10:13 pm, Mahaboob wrote:

NSString    *content;
for(i=0;i<[tableView numberOfRows];i++)
       {
           if([tableView isRowSelected:i])
           {
              content = [[[[[tableView
tableColumnWithIdentifier:@"MediaType"] dataCellForRow:i]stringValue]
stringByAppendingString:@","]
stringByAppendingString:[[[tableView tableColumnWithIdentifier:@"Category"]
dataCellForRow:i]stringValue]] ;

NSLog(@"%@",content);
           }
       }


A further observation.

Each time through your loop you assign a value to 'content', but content itself never appears in the subsequent expression, meaning that you are discarding each value of 'content' except the last one. You would see each one in the log however... but since you are attempting to rely on the value of -dataCellForRow: which is NOT doing what you think it is (read the docs) you'll see the same values repeated on each logged line no matter what is selected.

--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to