Properly using of "arrangedObjects" in NSArrayController
Properly using of "arrangedObjects" in NSArrayController
- Subject: Properly using of "arrangedObjects" in NSArrayController
- From: Alexander Zvyagin <email@hidden>
- Date: Wed, 22 Dec 2010 16:43:59 +0300
- Acceptlanguage: en-US, ru-RU
- Thread-topic: Properly using of "arrangedObjects" in NSArrayController
Hi, All!
Tell me please, what I do wrong or miss to get in my mind?
I mean the NSArrayController is for synchronization between two arrays,
or between keyPaths of items in two arrays.
Now i'm trying to bind the Model 'array' property to custom 'array' property in class View using NSArrayController:
@implementation Model
@synthesize array; // an array of objects of class containing "name" public property.
-( void )awakeFromNib
{
// The standart binding from "value" property of tableView is working fine (i write it there instead of IB xib):
[controller bind:@"contentArray" toObject:self/*a Model*/ withKeyPath:@"array" options:nil];
[tableColumn bind:@"value" toObject:controller withKeyPath:@"arrangedObjects.name<http://arrangedObjects.name>" options:nil];
// And binding "arrangedObjects" to the custom property of View is binds Okay, but not working:
[view bind:@"array" toObject:controller withKeyPath:@"arrangedObjects" options:nil];
}
View contain similar NSMutableArray* like a Model class, but if I change this array in View, it's not reflected to the Model.
Is NSArrayController bind only the "arrangedObjects.name<http://arrangedObjects.name>" (or something like) nor the common "arrangedObjects"?
Or is the TableView "value" is a special Cocoa magic?
I.e. what is the difference between:
[tableColumn bind:@"value" ...
[view bind:@"none-standart_property" ...
Do "value" binding made special setObservations for itself not accessible for over properties?
Alex-
Thanx, and sorry for my not ideal English.
_______________________________________________
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