• 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: Implementing a many-to-many ("reflexive") relationship using bindings and an NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementing a many-to-many ("reflexive") relationship using bindings and an NSTableView


  • Subject: Re: Implementing a many-to-many ("reflexive") relationship using bindings and an NSTableView
  • From: Keary Suska <email@hidden>
  • Date: Wed, 25 Mar 2009 18:43:07 -0600

On Mar 25, 2009, at 2:44 PM, Jon C. Munson II wrote:

Do you mean here that you will "pop up" a window that contains an
NSTableView that will be used to select rows of Entity B? Correct
language is critical. I think most Cocoa developers would assume that
"popup" means NSpopupButton.


[Jon C. Munson II] Yes, an NSPopupButton is what I meant to imply here.

How would you do that? A popup button may only represent a single value. If you need to represent multiple values, you will need something like mmalc's the checkboxes example or a table view.


You should be able to use bindings for everything you describe except
for setting relationships between existing objects. That will have to
be done in code, AFAIK, but isn't difficult.

[Jon C. Munson II] OK. Benjamin Stiglitz responded suggesting I take a
look at the ToManyCheckbox example on mmalc's page, so I'll do that and see
if that clarifies things. Also, I noticed in the iClass example that code
is used to support the relationship and so on. Is that the recommended
"template" implementation to support this type of relation?

You might be able to use an array controller whose content is the to- many relationship, calling addObject: with the managed object to add to the relationship, but otherwise the controller wouldn't interact with the UI. At that rate, it is probably better to set the relationship in code.


Generally, inserting new objects into a to-many relationship using an array controller is a common method.

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

_______________________________________________

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: 
 >Implementing a many-to-many ("reflexive") relationship using bindings and an NSTableView (From: "Jon C. Munson II" <email@hidden>)
 >Re: Implementing a many-to-many ("reflexive") relationship using bindings and an NSTableView (From: Keary Suska <email@hidden>)
 >RE: Implementing a many-to-many ("reflexive") relationship using bindings and an NSTableView (From: "Jon C. Munson II" <email@hidden>)

  • Prev by Date: Re: Two view controllers in one set of files (Noob question)
  • Next by Date: NSTextField setTextColor not working on Tiger
  • Previous by thread: RE: Implementing a many-to-many ("reflexive") relationship using bindings and an NSTableView
  • Next by thread: Re: Implementing a many-to-many ("reflexive") relationship using bindings and an NSTableView
  • Index(es):
    • Date
    • Thread