OutlineView shouldSelectItem Being Called Twice
OutlineView shouldSelectItem Being Called Twice
- Subject: OutlineView shouldSelectItem Being Called Twice
- From: Chris Tracewell <email@hidden>
- Date: Tue, 04 Jun 2013 18:56:19 -0700
I've got a view controller set up as the delegate for an outlineView. The view controller implements the -(BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem:(id)item delegate method. I show an alert and return NO if the user has not saved some changes or return YES if all is well. The problem is that when I return no the delegate method fires twice. Even when I strip out all of my code and just log the method as shown below it shows two calls. Returnign YES works fine. I thought maybe it's because it was firing once for the original election change and then again to return back to the original selection but logging "item" showed its the same row for both calls.
-(BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem:(id)item
{
NSLog(@"firing");
return NO;
}
Is this normal behavior? Thanks for the help.
-CT
_______________________________________________
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