Re: Core Data, Filtering by PopUps & Bindings Confusion
Re: Core Data, Filtering by PopUps & Bindings Confusion
- Subject: Re: Core Data, Filtering by PopUps & Bindings Confusion
- From: Quincey Morris <email@hidden>
- Date: Fri, 14 Nov 2008 16:04:24 -0800
On Nov 14, 2008, at 15:21, Brad Gibbs wrote:
My categories Popup Button (categoriesPUB) is bound to the
categories array controller as follows:
Content.arrangedObjects
ContentValues.arrangedObjects.displayName
I've tried a variety of bindings for the popup button's
selectedObject binding, but I'm not sure how to bind it in this
instance.
If you care what the category categoriesPUB shows initially, you're
going to have to have a "currentCategory" property on File's Owner and
bind the buttons's Selected Object to that. You would change
currentCategory yourself (KVO-compliantly, of course) whenever the
user chooses a new product, and let the popup button binding change it
when the user chooses a new category.
If you're going to have a "currentCategory" property, then you can
bind typesPUB's content to File's Owner.currentCategory.children and
everything should work. :)
I tried binding the typesAC's contentSet to File's
Owner.categoriesPUB.selectedItem.representedObject.children
but nothing showed up in the typesPUB.
Was anything actually selected in categoriesPUB when you looked at
typesPUB?
To debug something like that, you just have to go key by key, perhaps
writing a line of code to fetch values so that you check them in the
debugger to make sure what you expect.
Also, make sure you check the log for error messages. Mysterious lack
of working is often accompanied by a useful message.
_______________________________________________
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