Re: Argh never-ending troubles with bindings
Re: Argh never-ending troubles with bindings
- Subject: Re: Argh never-ending troubles with bindings
- From: Rick Mann <email@hidden>
- Date: Wed, 08 Feb 2017 18:00:54 -0800
> On Feb 8, 2017, at 17:41 , Quincey Morris <email@hidden> wrote:
>
> On Feb 8, 2017, at 17:17 , Rick Mann <email@hidden> wrote:
>>
>> it's the Managed Object Context that's bound to "self.representedObject.managedObjectContext".
>
> “self.” is unnecessary. AFAIK it’s just voodoo arising from attempts to work around some bug or confusion several years ago.
>
> The other two keys you have control of. You can override the default property getters to “watch” what happens when the binding is resolved/referenced. My guess is that it’s not a bindings problem, exactly, but something misplaced/misconfigured/overlooked, and you need to look in a different place for what’s going on. But I’m just guessing.
I haven't figured out how to override the getter in Swift without also providing backing. There's no willGet{} in Swift.
In my other app, that works, I set the representedObject in a subclass of NSWindowController when NSWindowController's document is set. I could try this, but I feel like that shouldn't be necessary.
--
Rick Mann
email@hidden
_______________________________________________
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