> On Oct 4, 2015, at 09:51 , Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Oct 4, 2015, at 05:10 , Roland King <r...@rols.org> wrote: >> >> Quincey sharpens his keyboard > > No, the only person who’d get hurt is me. > > There are actually several strange things going on here in the > AVCaptureDevice API, and they look like bugs to me: > > — ‘devices’ and ‘formats’ are documented to return arrays. There’s nothing > about a nil return, so I don’t understand why they’re bridged into Swift > '[…]!’ types, since *surely* they return an empty array if there aren’t any > devices or formats, and there’s no error return. Maybe just a missing > nullability annotation. > > — ‘devices’ and ‘formats’ are documented to return arrays of > ‘AVCaptureDevice’ and AVCaptureDeviceFormat’ respectively. They should be > bridged to arrays of the correct types. Again maybe a missing NSArray generic > annotation? > > — Command-clicking on ‘formats’ really should display the generated Swift > header, but it displays the Obj-C header instead. We seen this before > recently. It looks like Swift sometimes gets confused over Obj-C properties, > but it’s odd that something so fundamental would be broken.
Thanks (to both of you). Quincey's comments reassure me that I was indeed correct in thinking things should work a certain way, and Roland's explain why I'm seeing what I'm seeing. And by "Swift sucking," I guess I meant Xcode, in that it still has numerous issues with code completion. -- Rick Mann rm...@latencyzero.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com