Re: filtering a tableView from a pulldown
Re: filtering a tableView from a pulldown
- Subject: Re: filtering a tableView from a pulldown
- From: "I. Savant" <email@hidden>
- Date: Tue, 28 Oct 2008 12:15:58 -0400
> The pulldown is bound as follows:
> content: arrangedObjects[PurchaseOrder Array Controller(NSArray Controller)]
> content values: Purchase ORder Array Controller
> arrangedObjects.orderReference
These bindings seem fine. How about selection? One of the popup's
selection bindings should be bound to the PurchaseOrder Array
Controller's selection.
> The Table view has 6 columns, one of which is the Purchase Order number (as
> displayed in the pulldown)
This seems wrong. If your table is intended to display the "line
items" belonging to the order, why have the order number on each line
item? In any case, you need a *separate* controller to reflect the
line items of the selected order. Create an array controller and set
it up so that it holds your "line item" objects. We'll call it your
"Line Item Array Controller". Its contents should be bound to
PurchaseOrder Array Controller's selection.lineItems (or whatever the
key path is to your order's line items).
Your table view's columns should each be bound to the Line Item
Array Controller's arrangedObjects.property (where "property" refers
to individual properties such as "item number", "description",
"quantity", etc.).
This way, the PurchaseOrder Array Controller lists and maintains
selection of purchase orders, where the Line Item Array Controller
lists the line items for the selected purchase order.
Spend as much time as you can manage reading over the documentation
I sent you previously. If there are things you don't understand, post
your questions back to the list for clarification.
--
I.S.
_______________________________________________
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