Re: NSTreeController and two relations for one entity
Re: NSTreeController and two relations for one entity
- Subject: Re: NSTreeController and two relations for one entity
- From: Xander Maas <email@hidden>
- Date: Wed, 15 Aug 2007 06:31:16 +0200
Thanks for all tips, I have found the problem (or programmer error).
Once again I had to rethik it several times and found that the entity
my NSTreeController is bound to is my customers entity. I was using
the wrong relation all the time, I was using the serviceDetails ->
Customers relation, but needed the Customers -> serviceDetails relation.
Once again, tanks for all tips.
Regards,
Xander
On Aug 14, 2007, at 8:43 PM, Diederik Hoogenboom wrote:
Hi Xander,
What you can do it create a selectedServices method in the
appropriate controller that returns the services from the customer
or contact (depending on what is selected). Bind the
NSTreeController to the selctedServices method and throw a
willChangeValueForKey:@"selectedServices" and
didChangeValueForKey:@"selectedServices" when the selection changes
so that the NSTreeController will recognize the change.
Diederik
--
Diederik Hoogenboom
Obvious Matter - DiskLibrary for Mac
http://www.obviousmatter.com
On 13-aug-2007, at 19:48, Xander Maas wrote:
Hi all,
I am having trouble understanding how I can solve a little puzzle
I have:
I have an entity (services) which in itself has two relations, one
to my customers entity one to my contacts entity.
I have set up my NSTreeController, thanks again for the help in
this list, so I now have my customers shown with their respective
contacts.
What I want to eccomplish is that when I select a customer I can
show the info from my services entity which relate to that
customer and the service details when I select the contact.
A bit like Mail.app for the mailbox tree. Or should I create two
entities for the service details, one for my contacts and one for
my customers?
Regards,
Xander Maas
_______________________________________________
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:
40obviousmatter.com
This email sent to email@hidden
_______________________________________________
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