Found a better way to remove all the objects in the wordlist ivar
Found a better way to remove all the objects in the wordlist ivar
* Source/AppController.m:
([AppController findWords:]): Improved the way we remove all the objects to clear the NSArrayController
diff --git a/Source/AppController.m b/Source/AppController.m
index 7b59c85..55fe550 100644
--- a/Source/AppController.m
+++ b/Source/AppController.m
@@ -39,11 +39,7 @@
*/
- (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];