• 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: setDoubleAction
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setDoubleAction


  • Subject: Re: setDoubleAction
  • From: Joel Levin <email@hidden>
  • Date: Tue, 22 May 2007 08:38:31 -0700

I think you need to use setTarget: in awakeFromNib, which tells the table view who to send the message scopClicked to. From the docs for setDoubleAction:
"For the method to have any effect, the receiver’s action and target must be set to the class in which the selector is declared."


- (void)awakeFromNib
{
	[scopTableView setDoubleAction:@selector(scopClicked)];
	[scopTableView setTarget:self];
}

Hope that helps.


On May 22, 2007, at 8:30 AM, Brian Weitzner wrote:

Hi all,
I am trying to implement a double click response in an NSTableView that is displayed based on a user's query. I have isEditable set to NO and the code I have for the double click so far is:
- (void)awakeFromNib
{
[scopTableView setDoubleAction:@selector(scopClicked)];
}
-(void)scopClicked
{
NSLog(@"I got clicked");
}
When I double click the cell in the NSTableView nothing happens. The tableview is displayed in a window that appears after the user submits a query (i.e. it is not visible when the app launches) and the eventual goal of this method is to get the string value of the cell (the entire row because there is only one column) so it can be used to perform an additional query. Any help would be most appreciated. Thanks!
--
Brian Weitzner



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
40gmail.com


This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >setDoubleAction (From: Brian Weitzner <email@hidden>)

  • Prev by Date: Re: NSPopUpButton Notifications
  • Next by Date: FTP Class
  • Previous by thread: setDoubleAction
  • Next by thread: Re: setDoubleAction
  • Index(es):
    • Date
    • Thread