Ok, so I'm pretty new to Cocoa, especially Bindings, but here's what I'm trying to do. I've got a Core Data model consisting of two entities: Category
and Item
. Category
has a to-many relationship to Item
called children
, and Item
has a relationship to Category
called parent
. Item
has two attributes that Category
does not have: quantity
and desiredQuantity
. What I'd like to do is display the tree in an NSOutlineView with two columns. One column is bound to the name
of either the Category
or the Item
. I want to the second column to display something along the lines of
2 of 5
for the Item
rows and nothing at all for the Category
rows. When I use a display pattern, the Category
rows end up showing
of
I noticed that if I don't use a display pattern for the second column, and instead just bind its Value to either the quantity
or the desiredQuantity
, the Category
rows show nothing; its only if I try to use the display pattern.
How can I make it display nothing for the Category
rows and still use the display pattern? Or can I?
Edit:
I guess I didn't explain what the NotApplicable marker has to do with anything - Category
does have properties for quantity
and desiredQuantity
, but they just return NSNotApplicableMarker.