Dificult question continue
Dificult question continue
- Subject: Dificult question continue
- From: Aidas <email@hidden>
- Date: Sun, 21 Jul 2002 02:47:23 +0200
I've thinked how to speed up search a little bit. Here is code that I made
but it's not speeded up:
int i;
int rodyti_pirma;
NSString* laikinas_zodis;
NSString* p_zodis;
BOOL ar_rado;
id theRecord;
int r_numeris;
rodyti_pirma=0;
r_numeris=[sarasas numberOfRows];
for ( i = 0; i <= r_numeris-1; i++ )
{
p_zodis=[komentarai stringValue];
theRecord = [records objectAtIndex:i];
laikinas_zodis=[theRecord objectForKey:@"zodis"];
ar_rado=[laikinas_zodis hasPrefix:p_zodis];
if (ar_rado==YES)
{
if (rodyti_pirma==0)
{
[sarasas selectRow:i byExtendingSelection:NO];
rodyti_pirma=1;
}
}
It searches NSMutableArray. When it founds item that it needs it continous
it search. I want it to stop it when needed item is found. Is it possible to
do it using "for ( I=0 balh blah blah)"? Or maybe I should use something
else? I don't know how to use while or loop functions.
Thank you and sorry for bombing this mailling list. :)
Aidas
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.