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 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]