• 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
Re: NSOutlineView Table Column Clicks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOutlineView Table Column Clicks


  • Subject: Re: NSOutlineView Table Column Clicks
  • From: Jordan Matthiesen <email@hidden>
  • Date: Wed, 24 Oct 2001 11:27:18 -0700

That does work for mouseDown:, but I want the code to execute in the mouseUp:. Sorry, I forgot to mention that. Thanks for the response!

Jordan

On Wednesday, October 24, 2001, at 11:21 AM, Nathan Schmidt wrote:

Set yourself up as the delegate for the outline view in awakeFromNib, for
example:

[yourOutlineView setDelegate:yourObject];
[yourOutlineView setAllowsColumnSelection:YES];


Then add this to yourObject:

- (BOOL)outlineView:(NSOutlineView *)outlineView
shouldSelectTableColumn:(NSTableColumn *)tableColumn {

//do something useful here...

//accept click but never select (the normal behavior)
return NO;
}


I've been trying to tackle an issue for awhile now, and so far have had
no luck... I want to have some code execute in the mouse up of a column
header in an NSOutlineView. I see how to do this with an NSTableView,
but unfortunately the "tableView:didClickTableColumn:" method does not
get called for the outline view. I've tried creating a subclass of
NSTableHeaderCell and overriding the "trackMouse: inRect: ofView:
untilMouseUp:" method, but it does not execute the NSLog() statement I
put in it (I did instantiate an object from my subclass and associate it
with one of the NSTableColumn objects in the OutlineView using
NSTableColumn setHeaderCell:). I thought this is what was recommended
to people trying similar things, but I can't seem to get it to work.
Does anyone have any ideas? Thanks!


  • Prev by Date: Re: jar in .app bundle?
  • Next by Date: Re: Child threads and the UI
  • Previous by thread: NSOutlineView Table Column Clicks
  • Next by thread: jar in .app bundle?
  • Index(es):
    • Date
    • Thread