• 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: 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

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

  • Prev by Date: Re: Can you get data from the software update PP?
  • Next by Date: Shared CoreData DataModel and DB file..
  • Previous by thread: Re: Updating tracking areas Rect
  • Next by thread: Re: Updating tracking areas Rect
  • Index(es):
    • Date
    • Thread