I have an NSView that is keeping track of a group of objects via an 
NSMutableArray ivar (let's call it relatedObjects).  Objects in this array are 
represented in the view by subviews (i.e. when I add an object to the array, a 
new subview appears, when I delete them, the associated subview is removed, 
etc.)  I'd like to expand the functionality of my NSView class by letting that 
array of objects be bound to an NSArrayController... unfortunately, I'm stymied 
by the very first step: That of actually getting relatedObjects to mirror the 
contents of the controller. 

So in short, my need is pretty simple: Bind an array to an NSArrayController.  
That being said, it seems that no combination of exposeBindings:, 
bind:toObject:withKeypath:options:, 
observeValueForKey:ofObject:change:context:, etc. is working as I expect it to. 
 Admittedly, I have done most of my binding work via IB and I've never really 
done much with bind:toObject:withKeypath:options: before, so I wouldn't be 
surprised to find that that was where my problem lay. 

Can anybody offer any general tips as to how I might be able to accomplish 
this?  I'm sure that this is one of those basic things that once I get it I'll 
do a full-on forehead slap when the light goes on, but right now I'm just 
feeling around in the dark. 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to