On Wed, 30 Jul 2014 15:45:04 -0500, Ken Thomases said: >A zeroing weak property changes without emitting KVO change >notifications. Therefore, it's not KVO-compliant. Basically, weak >properties are incompatible with KVO and bindings.
Ouch! Didn't realise that. That's pretty annoying, as weak is useful in ARC because ARC doesn't deal with cycles like GC does. I almost never used weak under GC but am now sprinkling them everywhere to deal with cycles. :( Is weak KVO-compliant under GC? I ask because, for now anyway, I'm trying to keep my codebase both GC & ARC compliant. So I changed my property from weak back to strong, but it didn't fix my issue. I also tried this handy hack to check for KVO+weak, but it didn't find anything either: <https://gist.github.com/vgrichina/4515445> Know any other way to catch use of KVO+weak? >Likewise, if any other property along that key path is changed in a non- >KVO-compliant manner, that would lead to the same sort of error. Other than use of 'weak', how else might something be changed in a non-KVO-compliant manner in ARC but not GC? Again, the error is only in ARC and not GC. One thing I just noticed is that NSWindowController's 'document' property is not actually documented as KVO-compliant. Maybe that's my problem... but I've been binding through it for over a decade now! Cheers, -- ____________________________________________________________ Sean McBride, B. Eng [email protected] Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
