> On Jan 8, 2017, at 1:12 PM, Quincey Morris 
> <quinceymor...@rivergatesoftware.com> wrote:
> 
> On Jan 8, 2017, at 05:49 , Charles Jenkins <cejw...@gmail.com 
> <mailto:cejw...@gmail.com>> 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 (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

Reply via email to