Re: How to bind to a custom controller class?
Re: How to bind to a custom controller class?
- Subject: Re: How to bind to a custom controller class?
- From: Koen van der Drift <email@hidden>
- Date: Sun, 06 Nov 2011 22:10:39 -0500
Ok, after a day of trying various things, I got it to work. Not sure
how I got here, but I am using an NSViewController plus corresponding
nib; the representedObject of the NSViewController is the
NSArrayController. I also moved the NSArrayController to the
AppDelegate class, so it is accessible to all views. Then I bound my
view in IB to the File's Owner (the AppDelegate)
representedObject.arrayController.name, et voila, it works!
- Koen.
On Sun, Nov 6, 2011 at 5:14 AM, Koen van der Drift
<email@hidden> wrote:
> How do I bind a controller class to my core data model? The controller
> class (a subclass of NSObject) needs to access the value that is at
> arrangedObjects.name in an NSArrayController. The NSArrayController
> feeds an NSTableView, and that works fine through bindings, but I
> don't know how to tap into the model for my custom controller class.
> So, whatever is selected in NSTableView should go to my custom
> controller class for further processing, and the displaying the
> results.
>
> I looked in InterfaceBuilder, but there are no options to bind my
> controller class.
>
> Thanks,
>
> - Koen.
>
_______________________________________________
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