• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
OutlineView shouldSelectItem Being Called Twice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: OutlineView shouldSelectItem Being Called Twice
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: Can using iOS camera without preview, cause app store submission problem?
  • Next by Date: Re: OutlineView shouldSelectItem Being Called Twice
  • Previous by thread: Re: TECConvertText returns an unknown result code
  • Next by thread: Re: OutlineView shouldSelectItem Being Called Twice
  • Index(es):
    • Date
    • Thread