Using an arraycontroller for different object classes
Using an arraycontroller for different object classes
- Subject: Using an arraycontroller for different object classes
- From: Gideon King <email@hidden>
- Date: Fri, 15 May 2009 10:07:36 +1000
Hi, I have a situation where I have an array of objects that I want to
bind to so I can use them in an inspector, but the objects are of
different classes, and I want the inspector to only see the objects
that have the key that I am binding to.
For example, if I have an array of vehicles, and this array contains 4
car objects and 2 bulldozer objects. Now I want to have in my
inspector a binding for weight, and one for tyre size.
So for the binding for weight, it is applicable to both classes - they
both have an instance variable called "weight", so the array would
contain 6 objects, but for the binding for tyre size, the bulldozers
don't have tyres, so the array would only have 4 objects in it.
How should I approach this issue? It appears that the filter
predicates are set on the whole array and would affect everything, and
I have no way to set them based on the key that is being accesses.
Thanks in advance
Gideon
_______________________________________________
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