• 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
Setting double action from NSCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting double action from NSCell


  • Subject: Setting double action from NSCell
  • From: Ian was here <email@hidden>
  • Date: Fri, 11 Nov 2005 15:21:58 -0800 (PST)

I have an NSOutlineView with a single column. Each
type of cell must react to a double click in it's own
way. There is no doubleAction: method for an NSCell,
so I used the the following:



- (void)outlineView:(NSOutlineView *)olv
willDisplayCell:(NSCell *)cell
forTableColumn:(NSTableColumn *)tableColumn
item:(id)item
{
   if ( [item type] == myCellType )
   {
      [theCell setTarget:self];
      [theCell setAction:@selector(myAction:)];
   }
}


Unfortunately, ALL cells got this behaviour. I would
like to have a specific row or cell being double
clicked call an action method, but all other cells can
have their text edited from a double click (which is
default behaviour).


Thanks






__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: NSManagedObject and NSCoding
  • Next by Date: Re: NSManagedObject and NSCoding
  • Previous by thread: Re: NSManagedObject and NSCoding
  • Next by thread: Re: Setting double action from NSCell
  • Index(es):
    • Date
    • Thread