Re: Overriding NSArrayController to be used in a many-to-many RS and NSTable Bindings
Re: Overriding NSArrayController to be used in a many-to-many RS and NSTable Bindings
- Subject: Re: Overriding NSArrayController to be used in a many-to-many RS and NSTable Bindings
- From: Gustavo Pizano <email@hidden>
- Date: Thu, 17 Dec 2009 21:56:36 +0100
Ah ok..
Thanks a lot once again.. very helpful.
On Dec 17, 2009, at 9:32 PM, Quincey Morris wrote:
> On Dec 17, 2009, at 12:24, Gustavo Pizano wrote:
>
>> I was checking the documentation, just in case, Im not saying I will do it this way, but jsut to keep it in mind... Subclassing NSArrayController, and overriding add: method, I can get the entityName form the NSObjectController (Parent of NSArrayController), and create there the Instance of ItemXInvoice an Item, relate them and do as the doc says: " .... and sets it as the receiver’s content object using addObject:."
>>
>> That way shall work isn't it? just that in IB I must set the EntityName and the ManagedObjectContext....
>
> It works, but at the price of having to subclass NSArrayController. That seems unnecessary, since it's just as good to put the action method in your NSWindowController subclass (or your NSDocument subclass, if you're using that instead), which you presumably have already.
>
>
> _______________________________________________
>
> 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
_______________________________________________
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