Re: Core Data bound to NSPopUpButton
Re: Core Data bound to NSPopUpButton
- Subject: Re: Core Data bound to NSPopUpButton
- From: Allan Rentcome <email@hidden>
- Date: Fri, 23 Feb 2007 05:43:35 -0600
Thanks.
I will try later today generating a configuration automatically with
IB and compare the differences.
Yes, in the bindings of my second NSPopUpButton I have contentSet set
to my source controller.selection.toManyRelationship.
What I have found is the the selectionIndex in my first controller is
not changing when I change the selection in the first NSPopUpButton
which has it's content bound to the arrangedObjects of the
controller. I would have expected this to change. no?
As I mentioned I have tried the same arrangement but using two
NSTableViews and this did seem to work as expected.
I am fairly new to programming on the Mac so i'll watch the
terminology :-)
Allan
On Feb 22, 2007, at 10:09 PM, mmalc crawford wrote:
On Feb 22, 2007, at 5:45 PM, Allan Rentcome wrote:
I have a core data application. Within the interface I have two
NSPopupButtons. These are bound to two NSArrayControllers which in
turn are connected to my core data through the
ManagedObjectContext. One controller populates the content of one
of the pop-up buttons with entities and the other button is
populated by the other controller which has a contentSet based on
the current selection in the first controller ( there is a
relationship between these two entities). My problem is as follows:
Please try to use the correct terminology, it makes analysing the
problem much easier (an entity is not the same as a managed object,
for example).
1. When I change the selection in the first pop-up button I want
to change the content of the second pop-up button with the
entities that have a relationship with the selection in the first
pop-up. However, when I do not see any updates or changes in the
second pop-up when I change the selection in the first. I have
successfully done this with two NSTableViews but cannot get it to
work with the two NSPopupButtons. Besides the binding of the
content parameters what else do I need to bind?
What is the key path for the contentSet binding?
In what way is the configuration different from that generated by
Interface Builder if you create an interface automatically (see,
for example, <http://developer.apple.com/documentation/Cocoa/
Conceptual/NSPersistentDocumentTutorial/02_CreatingProj/
chapter_3_section_4.html>)?
(I'd expect contentSet to be bound to something like
[SourceController].selection.toManyRelationship)
mmalc
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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