Hello all.
in My Core Data application I have a custom NSTableView with Custom NSCells
inside because Im displaying the name of the user with the image of the user
(the picture), its displaying fine, when selecting its selecting ok.. so far so
good..
But I implemented the -(void)rightMouseDown:(NSEvent *)theEvent{, where I
display a custom magic view panel, like the ones on the dock, and I do the
following after I display the panel:
NSInteger rowInt = [self rowAtPoint:_mousePoint];
...
....
[[(UserListViewController *)[self _myController] _userListArrayController]
setSelectionIndex:rowInt];
..
...
The UserControllerList is the NSArrayController that holds the Users of the
table. Then When I select (normal click another user) randomly occurs the
“EXC_BAD_ACCESS”.
Checking in the debugger I see that the last method that was called was:
-(NSDictionary *)userDictionary{
return [self dictionaryWithValuesForKeys:[NSArray
arrayWithObjects:@"firstName",@"lastName",@"avatar",@"title",nil]];
}
which is a method that returns the keys for the User entity attributes, I did
so following Tim blog. :
http://www.timisted.net/blog/archive/custom-cells-and-core-data/.
So Im guessing that somehow when setting the selectedIndex in the the
NSArrayController Im messing up with the insights of it and then suddenly it
will blow up if I keep left clicking the user list changing selections.
Or I have something wrong in the approach I took to display the fields in the
custom NSCell.
I tried to blow the app up by just left-clicking and it happens also but not so
immediately as when I right click an item in the list, which tells me that
definitely there is something wrong in the approach to display Core Data
attributes in a custom NSCell.
Any ideas?
thanks, andy help will be appreciate it.
Gustavo
_______________________________________________
Cocoa-dev mailing list ([email protected])
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]