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 (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