• 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: Overriding NSArrayController to be used in a many-to-many RS and NSTable Bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 20:30:31 +0100

Yeah I mean, the "Use Selected Item" button will be bound to a IBAction which will create a new NSEntityDescription of ItemXInvoice and then relate it to the Selected ITem.. now I have its a doubt about the awakeFromInsert overridden method in the ItemXInvoice ... this wil give me trouble if I want to create a new Item there... then when creating the new Entity itemXInvoice in the IBAction will create a new Item also...  no?


On Dec 17, 2009, at 8:21 PM, Quincey Morris wrote:

> On Dec 17, 2009, at 11:07, Gustavo Pizano wrote:
>
>> In fact what I want is to allow the user to, create new Items,  and use Exiting ones, in any case a new ItemXInvoice must be created somehose,...For the second option I had in mind, that once I select an exiting Item, then I click an "Use selected" button, this one will create a ItemXInvoice relate it to the selected Item and insert it into the  NSArrayController which is bound to the NSTableView .... can this work?...
>
> It's hard to get that to work if you're using NSArrayController's 'add:' method, but if you use an action method of your own, it should be fairly straightforward. (You can use NSArrayController's 'addObject:' method to add the new ItemXInvoice to the table after you've created the relevant objects, or if you add it to the Core Data model KVO-compliantly the NSArrayController will get notified automatically.)
>
> You may want to keep thinking about the interface, though. What if you want to add an item (ItemXInvoice) to *this* invoice based on an Item that's in a different invoice (and hence not displayed)? Seems to me the hard part here is designing the interface, not coding it.
>
>
> _______________________________________________
>
> 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

References: 
 >Overriding NSArrayController to be used in a many-to-many RS and NSTable Bindings (From: Gustavo Pizano <email@hidden>)
 >Re: Overriding NSArrayController to be used in a many-to-many RS and NSTable Bindings (From: Quincey Morris <email@hidden>)
 >Re: Overriding NSArrayController to be used in a many-to-many RS and NSTable Bindings (From: Gustavo Pizano <email@hidden>)
 >Re: Overriding NSArrayController to be used in a many-to-many RS and NSTable Bindings (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Diacritics in Thai
  • Next by Date: Re: narraycontroller sort performance problems
  • Previous by thread: Re: Overriding NSArrayController to be used in a many-to-many RS and NSTable Bindings
  • Next by thread: Re: Overriding NSArrayController to be used in a many-to-many RS and NSTable Bindings
  • Index(es):
    • Date
    • Thread