NSArrayController and Array Operators Bindings
NSArrayController and Array Operators Bindings
- Subject: NSArrayController and Array Operators Bindings
- From: Fred Glover <email@hidden>
- Date: Mon, 13 Sep 2004 13:34:58 -0700
I have a simple document based application that uses an
NSArrayController to manage an array of identical model objects and
change and observe KVO compliant ivars.
There is no glue code.
I have an NSTextField whose value is bound to the controller's
arrangedObjects@count key.
This all works.
Now I want to be able to bind to other array operators besides
arrangedObjects@count.
I bound a "Number passed" NSTextField value to
email@hidden where gotIt is one of my model's KVO
compliant accessors and which returns a 0 or a 1.
This works for the initial instance of an object.
This fails on the SECOND time I instantiate an object. All the bound
accessors update and then everything just stops. period. no error
messages in the Run log. Dead.
Am I correct in assuming that NSArrayController can't use Array
Operators besides @count because the others return arrays of objects
instead of a single value?
Is there any way to make this with work with "pure" bindings?
Do I need to implement methods in MyDocument to access these array
operators and then bind them to my View?
Or do I do this by creating my own array controller derived from
NSObject?
Fred Glover
Machine Vision and Image Processing Engineering
Visicon Inc
www.visiconeng.com
Los Gatos, CA
408 354-0095
_______________________________________________
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