• 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
can't set double action in NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

can't set double action in NSOutlineView


  • Subject: can't set double action in NSOutlineView
  • From: Donald Hall <email@hidden>
  • Date: Fri, 14 Mar 2003 00:25:03 -0700

Hi all,

I am trying to set the double click action in an NSOutlineView, but it's not working. Double clicking an item in my outline view still causes the default behavior of making the text editable to happen. In my windowControllerDidLoadNib: method I have the following lines:

[myOutlineView setRefusesFirstResponder:YES]; // don't let clicks in it change responder chain!
[myOutlineView setDoubleAction:@selector(openItem:)]; // double click opens item in Finder
{ // test statements
SEL da = [myOutlineView doubleAction];
NSLog(@"da is %@", NSStringFromSelector(da));
}


For now my openItem method looks like this:

-(void)openItem:(id)sender
{
NSLog(@"in openItem"); // just a test for now
}

I can confirm that myOutlineView has openItem: as its doubleAction, but the method does not get called when I double click in the outline view.

The odd thing is, my document window also has a table view, and I am able to set its double action without a problem in the same windowControllerDidLoadNib: method.

Does anyone have any suggestions? Cleaning the target didn't help.

Thanks,

Don

p.s. also tried making my document class the delegate of my outline view to use the already existing tableView:shouldEditTableColumn:row: method which I use to disable editing in my table view. It never gets invoked when I click in the outline view.
--
Donald S. Hall, Ph.D.
Apps & More Software Design, Inc.
email@hidden
http://www.appsandmore.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Prev by Date: Re: Checking the type...
  • Next by Date: anoncvs.opensource.apple.com CVS server dead?
  • Previous by thread: Java bridge hangs app when calling method that allocates a java.awt.Rectangle
  • Next by thread: Re: can't set double action in NSOutlineView
  • Index(es):
    • Date
    • Thread