NSNotFound

Here is an extract from the Apple Cocoa Documentation regarding NSNotFound.

I have come across this in converting some code from ObjC to ASOC where it is used as follows:

	for (index = [indexes lastIndex]; index != NSNotFound; index = [indexes indexLessThanIndex:index])
	{
		if (index < destinationIndex)
		{
			destinationIndex --;	
		}
		id obj = [images objectAtIndex:index];
		[temporaryArray addObject:obj];
		[images removeObjectAtIndex:index];
	}

Does anyone know the correct way to use NSNotFound in ASOC?

Thanks

–Terry

Unless you have a chance of hitting such high numbers, in which case good luck with ASObjC, you could probably just test for greater than 0x7fffffff - 1 – that would catch either eventuality.