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: Diederik Hoogenboom <email@hidden>
- Date: Tue, 14 Aug 2007 20:43:35 +0200
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