• 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: "to-many" bindings in Interface Builder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "to-many" bindings in Interface Builder


  • Subject: Re: "to-many" bindings in Interface Builder
  • From: John <email@hidden>
  • Date: Sat, 17 Apr 2004 18:00:42 +0100

Hi,
Yes that would be the idea of my program, and that solution works perfectly.

Thanks.
John.

On 17 Apr 2004, at 17:08, Allan Odgaard wrote:

On 17. Apr 2004, at 10:48, John wrote:

I have a table of customers, each customer can have many invoices, and each invoice can have many invoiceLineItems.

Is the goal to have 3 table views where the first show all customers, the second show the invoices of the current customer and the third show the lines of that invoice (i.e. just like an NSBrowser)?

In that case you need 3 array controllers and you need to bind the 'contentArray' of the third one (showing the invoice lines) to the second one (showing the invoices) with a key path like 'selection.invoiceLines' -- where 'invoiceLines' is the key of the invoice record/dictionary holding an invoice line array -- so each time the selection is changed in the second array controller, the entire content is changed in the third one.

Likewise bind 'contentArray' of the second array controller to 'selection.invoices' of the first array controller -- here 'invoices' is the key in the customer record/dictionary holding the invoice array.

The first array controllers 'contentArray' is bound (or connected) to where ever you store the array of all customers.

Finally bind the various table column values to the proper array controllers.

Hope it helps...
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >"to-many" bindings in Interface Builder (From: John <email@hidden>)
 >Re: "to-many" bindings in Interface Builder (From: mmalcolm crawford <email@hidden>)
 >Re: "to-many" bindings in Interface Builder (From: John <email@hidden>)
 >Re: "to-many" bindings in Interface Builder (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: OBJ-C question
  • Next by Date: Re: OBJ-C question
  • Previous by thread: Re: "to-many" bindings in Interface Builder
  • Next by thread: Re: cocoa bindings
  • Index(es):
    • Date
    • Thread