title: Loading all the values of an attribute of core data to an array
body: <p>I have an attribute "term" which is a NSString in my core data "Event".
  When the table view is loaded I want all the values of "name" to be loaded to an array.</p>
  
  <p>I used the code</p>
  
  <pre><code>- (void)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath {
        Event   *event  = nil;
        event = [fetchedResultsController objectAtIndexPath:indexPath];
      if(searching){
          cell.textLabel.text = [copyListOfItems objectAtIndex:indexPath.row];
      }else{   
            if(event.term){ 
                  [listOfItems addObject:event.term]; 
           }
            cell.textLabel.text = event.term;
            cell.detailTextLabel.text = event.definition;
        }
  }
  </code></pre>
  
  <p>The problem is that all the terms are not loaded to the NSMutableArray listOfItems. It is loaded when the table cells is scrolled to bottom.</p>
  
  <p>How to load all the contents of "term" from core data to the array listOfItems.</p>
  
  <p>Any help will be greatly appreciated.</p>