I have some problem binding the number of objects in an array to a text label in app.

Just binding the label to my array controller (Controller Key = arrangedObjects and Model Key Path = @count) works fine and the value is updated when a change is made to the array.

But I want the number of objects to be part of a text string ("The number of students is: <the value>"). Thus I put this code into myDocument.m:

-(NSString *) numberOfStudents
{
return [NSString stringWithFormat:@"The number of students is: %@", [theStudentArrayController valueForKeyPath:@"[EMAIL PROTECTED]"]];
}

No error during compilation or run-time, but value in the text label is not updated when the array is changed.

Any clues?

/wamund




_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to