Found a better way to remove all the objects in the wordlist ivar
authorRobert Sesek <rsesek@bluestatic.org>
Mon, 17 Dec 2007 21:27:44 +0000 (16:27 -0500)
committerRobert Sesek <rsesek@bluestatic.org>
Mon, 17 Dec 2007 21:27:44 +0000 (16:27 -0500)
* Source/AppController.m:
([AppController findWords:]): Improved the way we remove all the objects to clear the NSArrayController

Source/AppController.m

index 7b59c855fb83a3fa479999664663059feccac4a9..55fe550ecd743ab993cb08a25139fd37ab926585 100644 (file)
  */
 - (IBAction)findWords:(id)sender
 {
-       // remove the wordlist
-       for (Word *word in [wordlist arrangedObjects])
-       {
-               [wordlist removeObject:word];
-       }
+       [wordlist removeObjects:[wordlist arrangedObjects]];
        
        NSString *tileString = [tilesField stringValue];
        int tileCount = [tileString length];