Re: Updating tracking areas Rect
Re: Updating tracking areas Rect
- Subject: Re: Updating tracking areas Rect
- From: Joar Wingfors <email@hidden>
- Date: Mon, 28 Dec 2009 09:00:16 -0800
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