• 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: Release mode bindings crash and release pools
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Release mode bindings crash and release pools


  • Subject: Re: Release mode bindings crash and release pools
  • From: Charles Srstka <email@hidden>
  • Date: Fri, 16 Jun 2017 16:02:16 -0500

> On Jun 16, 2017, at 3:48 PM, Charles Srstka <email@hidden> wrote:
>
>> On Jun 16, 2017, at 3:27 PM, Jerome Krinock <email@hidden> wrote:
>>
>>> On 2017 Jun 16, at 10:35, Quincey Morris
>>> <email@hidden
>>> <mailto:email@hidden>> wrote:
>>>
>>> it takes additional custom code (like in the joystick example) to implement
>>> the other direction. At least, that’s what I’ve been saying for years,
>>> though I don’t think I’ve ever found a developer who believes me.
>>
>> I believe you.  I think it was on your advice I've done this:
>>
>> foo.bind("xxx", to: bar, ... );
>> bar.bind("yyy", to: foo, ... );
>>
>> It works, but only in both directions with both statements.
>
> This is incorrect. The recommended way to implement a two-way binding is to
> override .bind(…) on the target object and set up KVO observations there. See
> this page in the docs:
>
> https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/HowDoBindingsWork.html
>
> <https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/HowDoBindingsWork.html>
>
> Charles

For more information (and a ton of sample code), see mmalc’s old page on the
subject. Sadly, it fell off the Web when MobileMe shut down, but archive.org
<http://archive.org/> still seems to have most of the info, including the
project .zip files:

http://web.archive.org/web/20120620180050/http://homepage.mac.com:80/mmalc/CocoaExamples/controllers.html

<http://web.archive.org/web/20120620180050/http://homepage.mac.com:80/mmalc/CocoaExamples/controllers.html>

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

References: 
 >Release mode bindings crash and release pools (From: Jonathan Mitchell <email@hidden>)
 >Re: Release mode bindings crash and release pools (From: Quincey Morris <email@hidden>)
 >Re: Release mode bindings crash and release pools (From: Jonathan Mitchell <email@hidden>)
 >Re: Release mode bindings crash and release pools (From: Quincey Morris <email@hidden>)
 >Re: Release mode bindings crash and release pools (From: Jerome Krinock <email@hidden>)
 >Re: Release mode bindings crash and release pools (From: Quincey Morris <email@hidden>)
 >Re: Release mode bindings crash and release pools (From: Jerome Krinock <email@hidden>)
 >Re: Release mode bindings crash and release pools (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: Release mode bindings crash and release pools
  • Next by Date: Re: Release mode bindings crash and release pools
  • Previous by thread: Re: Release mode bindings crash and release pools
  • Next by thread: Re: Release mode bindings crash and release pools
  • Index(es):
    • Date
    • Thread