• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Updating tracking areas Rect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Updating tracking areas Rect
      • From: Graham Cox <email@hidden>
    • Re: Updating tracking areas Rect
      • From: Gustavo Pizano <email@hidden>
References: 
 >Updating tracking areas Rect (From: Gustavo Pizano <email@hidden>)
 >Re: Updating tracking areas Rect (From: Gustavo Pizano <email@hidden>)

  • Prev by Date: Re: button cell - selection change timing
  • Next by Date: Re: Can you get data from the software update PP?
  • Previous by thread: Re: Updating tracking areas Rect
  • Next by thread: Re: Updating tracking areas Rect
  • Index(es):
    • Date
    • Thread