Re: NSArrayController & bindings: next hurdle.
Re: NSArrayController & bindings: next hurdle.
- Subject: Re: NSArrayController & bindings: next hurdle.
- From: Colin Howarth <email@hidden>
- Date: Wed, 23 Sep 2009 05:20:03 +0200
... And, of course, the accessors are @synthesized in the
@implementation.
On 23 Sep, 2009, at 05:09, Colin Howarth wrote:
On 23 Sep, 2009, at 04:46, Kyle Sluder wrote:
On Tue, Sep 22, 2009 at 7:21 PM, Colin Howarth <email@hidden>
wrote:
So, I have an NSArrayController (in IB). Its Content Array is
bound to an
NSMutableArray (of 'Element') instance in my AppDelegate.
No. It's bound to a property of some object. Please be precise;
NSMutableArray isn't KVO-compliant, so if you have indeed bound to a
property of an array then you're going to have problems.
So please describe the ordered collection property to which you've
bound your array controller. Are you exposing it as an
NSMutableArray? Just an NSArray? Or are you using the ordered
to-many accessor methods?
--Kyle Sluder
I was trying to be precise :-)
Array Controller Attributes:
Object Controller:
Mode: Object
Class: LensElement
Prepares Content: yes
Editable: yes
Array Controller Bindings:
Controller Content:
Content Array (Trace App Delegate.elements)
Bind to: Trace App Delegate
Model Key Path: elements
Array Controller Connections:
Received Actions:
remove: --- Push Button (Delete Element)
...
Bindings:
Content Array --- Trace App Delegate / elements
Referencing Bindings:
arrangedObjects.radius --- Value / Table Column (radius)
...
elements is an instance of an NSMutableArray.
The members of the array are instances of LensElement:
@interface LensElement : NSObject {
NSNumber *radius;
...
}
@property (copy, nonatomic) NSNumber *radius;
@end
@interface TraceAppDelegate : NSObject <NSApplicationDelegate> {
NSWindow *window;
NSMutableArray *elements;
LensElement *element;
}
@property (assign) IBOutlet NSWindow *window;
@property (assign) NSMutableArray *elements;
@property (assign) LensElement *element;
@end
_______________________________________________
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
_______________________________________________
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