aha mmm thanks...

that loop was the first thing came into my mind.
I cant use the last option because it may happen that I will have not just 2 TA 
but N..
G.


On Dec 28, 2009, at 6:00 PM, Joar Wingfors wrote:

> 
> On 28 dec 2009, at 07.55, Gustavo Pizano wrote:
> 
>>      NSInteger i = 0;
>>      while ([[self trackingAreas] count]==0) {
>>              [self removeTrackingArea:[[self trackingAreas] 
>> objectAtIndex:i]];
>>              i++;
>>      }
> 
> 
> That loop seems all kinds of wrong...   ;-)
> 
> How about:
> 
>       for (NSTrackingArea *trackingArea in [self trackingAreas]) {
>               [self removeTrackingArea:trackingArea];
>       }
> 
> Or even better - Use instance variables and skip the loop:
> 
>       [self removeTrackingArea:leftTrackingArea];
>       [self removeTrackingArea:rightTrackingArea];
> 
> j o a r
> 
> 

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to