• 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: Swift : iterating over NSArrayController arrangedObjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Swift : iterating over NSArrayController arrangedObjects


  • Subject: Re: Swift : iterating over NSArrayController arrangedObjects
  • From: Devarshi Kulshreshtha <email@hidden>
  • Date: Sun, 21 Jun 2015 20:21:09 +0530

>
> You’re trying to iterate an array of something and put each element into a
> tuple of ( index, element ), that’s not going to work.
>

>> ok


>
>
> Either
>
> for element in downlaodFileArrayController.arrangedObects {}
>

>> Got compilation error: Type 'AnyObject' does not conform to protocol
'Sequence Type'


> or
>
> for (index, element ) in
> downloadingFilesArrayControler.arrangedObjects.enumerate() {}
>
>
>> Got compilation error: AnyObject does not have a member named 'enumerate'


> If you’re on Swift 1.2 I think it’s enumerate(
> downloadingFilesArrayController.arrangedObjects ) instead of the enumerate
> on the end.
>
> Can’t say the error message makes any sense to me however, not that the
> one I get in Xcode 7 makes much more sense.
>
> >> I am trying it on Xcode 7 only


--
Thanks,

Devarshi
_______________________________________________

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


References: 
 >Swift : iterating over NSArrayController arrangedObjects (From: Devarshi Kulshreshtha <email@hidden>)
 >Re: Swift : iterating over NSArrayController arrangedObjects (From: Roland King <email@hidden>)

  • Prev by Date: Re: Swift : iterating over NSArrayController arrangedObjects
  • Next by Date: Re: Swift : iterating over NSArrayController arrangedObjects
  • Previous by thread: Re: Swift : iterating over NSArrayController arrangedObjects
  • Next by thread: Re: Swift : iterating over NSArrayController arrangedObjects
  • Index(es):
    • Date
    • Thread