• 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: Value of type '[AnyObject]!' has no member 'Generator'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Value of type '[AnyObject]!' has no member 'Generator'
      • From: Roland King <email@hidden>
References: 
 >Value of type '[AnyObject]!' has no member 'Generator' (From: Rick Mann <email@hidden>)
 >Re: Value of type '[AnyObject]!' has no member 'Generator' (From: Roland King <email@hidden>)

  • Prev by Date: Re: NSView - trouble setting next responder on 10.10 - works okay on 10.9
  • Next by Date: Re: Value of type '[AnyObject]!' has no member 'Generator'
  • Previous by thread: Re: Value of type '[AnyObject]!' has no member 'Generator'
  • Next by thread: Re: Value of type '[AnyObject]!' has no member 'Generator'
  • Index(es):
    • Date
    • Thread