tags:

views:

23

answers:

1

i am new in iphone prog...

i am using UITextView to view my data from database... my app is showing high scores from database.... i stored every row of data in a dictionary and then this dictionary in an array...

then i did reverse of that here.... here nextclass is object of that class where the actual method of select command is...... and highscore is my textview

NSArray *scores = [nextclass score];

NSMutableDictionary *DD;
int a = [scores count];
while(a>0)
{
    DD=[scores objectAtIndex:a-1];

    highscore.text=[NSString stringWithFormat:@"%@    --------------------------   %@",[DD objectForKey:@"name"],[DD objectForKey:@"score"]];
    a--;
}

the problem is that it replaces the data which was previously added to the textview..... but i want to show the whole data row by row

waiting for your response......

please help.....

+1  A: 
highscore.text=[NSString stringWithFormat:@"%@%@    --------------------------   %@",highscore.text, [DD objectForKey:@"name"],[DD objectForKey:@"score"]];

is one option, also you could use the method

stringByAppendingString

dkk
thanks...i will trybut know it will work so voted and accepted
Ranjeet Sajwan