• 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
Re: NSArrayController & bindings: next hurdle.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController & bindings: next hurdle.


  • Subject: Re: NSArrayController & bindings: next hurdle.
  • From: Colin Howarth <email@hidden>
  • Date: Wed, 23 Sep 2009 05:09:35 +0200


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


  • Follow-Ups:
    • Re: NSArrayController & bindings: next hurdle.
      • From: Kyle Sluder <email@hidden>
    • Re: NSArrayController & bindings: next hurdle.
      • From: Colin Howarth <email@hidden>
References: 
 >NSArrayController & bindings: next hurdle. (From: Colin Howarth <email@hidden>)
 >Re: NSArrayController & bindings: next hurdle. (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: an app that never quits
  • Next by Date: Re: Handling a File Drag to my Window
  • Previous by thread: Re: NSArrayController & bindings: next hurdle.
  • Next by thread: Re: NSArrayController & bindings: next hurdle.
  • Index(es):
    • Date
    • Thread