Re: Updating tracking areas Rect
Re: Updating tracking areas Rect
- Subject: Re: Updating tracking areas Rect
- From: Gustavo Pizano <email@hidden>
- Date: Mon, 28 Dec 2009 18:22:47 +0100
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@hidden)
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:
This email sent to email@hidden