Re: Swift : iterating over NSArrayController arrangedObjects

2015-06-21 Thread Devarshi Kulshreshtha
Thanks for your help :) I got it working using this: for index in downloadingFilesArrayController.arrangedObjects as! [AnyObject] { } On Sun, Jun 21, 2015 at 8:01 PM, Ken Thomases wrote: > On Jun 21, 2015, at 8:44 AM, Devarshi Kulshreshtha < > devarshi.bluec...@gmail.com> wrote: > > > I have a

Re: Swift : iterating over NSArrayController arrangedObjects

2015-06-21 Thread Devarshi Kulshreshtha
> > 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

Re: Swift : iterating over NSArrayController arrangedObjects

2015-06-21 Thread Ken Thomases
On Jun 21, 2015, at 8:44 AM, Devarshi Kulshreshtha wrote: > I have an array controller which stores managed objects of entity > 'Student', I am trying to iterate over its content using below code: > > for (index, element) in downloadingFilesArrayController.arrangedObjects{ > > // wan

Re: Swift : iterating over NSArrayController arrangedObjects

2015-06-21 Thread Roland King
> On 21 Jun 2015, at 21:44, Devarshi Kulshreshtha > wrote: > > I have an array controller which stores managed objects of entity > 'Student', I am trying to iterate over its content using below code: > > for (index, element) in downloadingFilesArrayController.arrangedObjects{ > > //