Watch next object in NSEnumerator
I have a NSEnumerator object with the text lines retrieved from a NSTextView, parsed with: 

    NSEnumerator *myLines = [[allTheText componentsSeparatedByCharactersInSet:[NSCharacterSet newlineCharacterSet]] objectEnumerator];

I'm processing the lines inside a for cycle like this:

    for (NSString *current_line in myLines)
    {
         //doing something
        
    }

This works fine, but now I need to watch the next object while processing the current one. What would be the best way to do this without disrupting the current cycle? If I do something like this (inside the current cycle), it won't work:

                

    //inside the previous cycle                    
    NSString *next_line;
                       
    if (next_line = [myLines nextObject])
    {
       //process next line
    }

Thank you! (not much experience in Objective-c development)
Watch next object in NSEnumerator
===

I have a NSEnumerator object with the text lines retrieved from a NSTextView, parsed with: 

    NSEnumerator *myLines = [[allTheText componentsSeparatedByCharactersInSet:[NSCharacterSet newlineCharacterSet]] objectEnumerator];

I'm processing the lines inside a for cycle like this:

    for (NSString *current_line in myLines)
    {
         //doing something
        
    }

This works fine, but now I need to watch the next object while processing the current one. What would be the best way to do this without disrupting the current cycle? If I do something like this (inside the current cycle), it won't work:

                

    //inside the previous cycle                    
    NSString *next_line;
                       
    if (next_line = [myLines nextObject])
    {
       //process next line
    }

Thank you! (not much experience in Objective-c development)