From d9fce1b840c9160380fbd8d9c274fc7c6fffab63 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 17 Dec 2007 16:27:44 -0500 Subject: [PATCH] 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 --- Source/AppController.m | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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]; -- 2.22.5