• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Binding nested objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Binding nested objects


  • Subject: Binding nested objects
  • From: Bruce Truax <email@hidden>
  • Date: Tue, 19 Oct 2004 16:59:55 -0400

I have an object called ACSurface. I hold an array of these objects and
they supply the content of a table view. Some of the objects in ACSurface I
display using an extra info window, again all of the values are displayed
using bindings. Now I want to add some objects to ACSurface which are
themselves objects containing some values. The structure looks like:

LensDataObjectArray <- ACSurface -< PikupData


TOP LEVEL OBJECT
@interface ACLensDataObject : NSObject
{
IBOutlet NSMutableArray *surfaceArray;
ACSurface *aSurface;

.
.
.
}
Where surfaceArray is an array of aSurface objects

NEXT LEVEL DOWN
@interface ACSurface : NSObject {
NSArray *lensParameterList;
int surfaceNumber;
BOOL astop;
float rd;
float rdx;
float rdy;
float th;
ACPikupData *thPikup;
.
.
.
}

BOTTOM LEVEL

@interface ACPikupData : NSObject {
int surface;
float scale;
float offset;

}


I have an NSObjectController bound to the ACLensDataObject and then an array
controller bound to selection.surfaceArray. I tried binding another
NSObjectController to selection.thPikup but I get the following error
message:

2004-10-19 16:29:21.458 AccosX[11650] [<ACLensDataObject 0x54392e0>
valueForUndefinedKey:]: this class is not key value coding-compliant for the
key thPikup.

It is not clear to me how I am supposed to bind to an object within an
object contained in an array. I assume that there is a way to nest KVO
bindings arbitrarily deep but it is not obvious how to go about this.

Thanks.

Bruce


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Binding nested objects
      • From: Scott Stevenson <email@hidden>
  • Prev by Date: NSUserDefaultsController and multiple sets of preferences?
  • Next by Date: Expanding lists
  • Previous by thread: NSUserDefaultsController and multiple sets of preferences?
  • Next by thread: Re: Binding nested objects
  • Index(es):
    • Date
    • Thread