Re: Value of type '[AnyObject]!' has no member 'Generator'
Re: Value of type '[AnyObject]!' has no member 'Generator'
- Subject: Re: Value of type '[AnyObject]!' has no member 'Generator'
- From: Rick Mann <email@hidden>
- Date: Sun, 04 Oct 2015 03:56:18 -0700
> On Oct 3, 2015, at 23:03 , Roland King <email@hidden> wrote:
>
> Apply the usual swift technique and break it down into more than one line then go look at the types of each variable.
>
> let ff = device.formats
> let pp = ff!
>
> option-click on each of those variables and you’ll quickly see the ‘!!’ on the first one and hence why you have to explicitly unwrap it to get it into a [AnyObject] which has a generator.
A) Ah, so it's Swift continuing to suck.
B) Why is device.formats double-bang?
C) Why can't I option-click on formats in device.formats to get an answer (because A)?
D) Why does command-clicking on formats take me to an Obj-C file (because A)?
Thanks for pointing out you can get the type of a variable by option-clicking it like that. Not sure why it doesn't consistently work (e.g. why can't I get the type of formats), but that'll be very helpful.
--
Rick Mann
email@hidden
_______________________________________________
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