Re: Bindings / NSTableView (limitation ?)
Re: Bindings / NSTableView (limitation ?)
- Subject: Re: Bindings / NSTableView (limitation ?)
- From: "Daniel Angermeier" <email@hidden>
- Date: Thu, 28 Jun 2007 01:23:02 +0200
Thanks for that info!
actually I am doing it slightly different:
NSArray *myArray= (NSArray *)[myArrayController arrangedObjects];
could this ever be inconsistent given my approach of accessing this array with
the row index from the table view that is passed to my delegate method ?
Thanks again,
Daniel
On 6/27/07, mmalc Crawford <email@hidden> wrote:
On Jun 27, 2007, at 10:42 AM, Daniel Angermeier wrote:
> - (void)tableView:(NSTableView *)aTableView willDisplayCell:(id)aCell
> forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
> {
> id item= [myArray objectAtIndex:rowIndex];
> if([[item objectForKey:@"mark"] boolValue])
>
No, this is wrong.
An array controller's arrangedObjects may not be in the same order as
your array...
For alternative approaches, please check existing examples -- e.g. To
Dos at <http://homepage.mac.com/mmalc/CocoaExamples/controllers.html>.
mmalc
_______________________________________________
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