Re: AVSimplePlayer in Swift?
Re: AVSimplePlayer in Swift?
- Subject: Re: AVSimplePlayer in Swift?
- From: Charles Srstka <email@hidden>
- Date: Sun, 08 Jan 2017 16:13:27 -0600
> On Jan 8, 2017, at 1:12 PM, Quincey Morris <email@hidden> wrote:
>
> On Jan 8, 2017, at 05:49 , Charles Jenkins <email@hidden <mailto:email@hidden>> wrote:
>>
>> changing to CDouble didn’t help
>
> This is one of those cases where I regretted pressing “Send” just 2 minutes later. What I wrote was a thought process that didn’t make complete sense.
>
> There are 4 possibilities and you’ll need to narrow it down to one:
>
> 1. The property type is incorrect. You could try changing it to an explicit NSNumber, which is the type that the binding actually requires.
This is not the problem; KVO works just fine with a property typed as Double as long as the property is marked ‘dynamic', which my sample code demonstrates (for some reason, the mailing list software separated the “.zip” from the rest of the link, so just add “.zip” to the end manually to download it).
> 2. The property accessors are not using the correct calling convention (@objc). If they’re in a view controller subclass (which is an @objc) object, they’ll normally be @objc, but there are some situations (e.g. declaring them private) that may make them native Swift. Leaving off the “dynamic” would come under this case too, but this was covered already.
>
> 3. The property declaration is fine, but IB is broken and doesn’t recognize the property as compatible. It may simply fail to set up the binding properly, even though it would work if it did. You could try leaving it unbound, and set up the binding at run time.
>
> 4. The property is fine, and something else is wrong.
>
> Finally, I’d note that the discussion in this thread had jumped back and forth between bindings and KVO. I’ve lost track of whether you’re saying that KVO isn’t working here (Charles posted sample code that he said works), or whether bindings aren’t working here.
I think that seeing a simplified version of the code that isn’t working would be the easiest way to debug this at this point. OP, would you mind posting it?
Charles
_______________________________________________
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