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

Re: setDoubleAction in tableView


  • Subject: Re: setDoubleAction in tableView
  • From: Kurt Marek <email@hidden>
  • Date: Mon, 17 Nov 2003 20:21:05 -0800

Okay, I added a setAction method to nil and it works properly now. Thanks for all the suggestions.

Kurt

On Nov 17, 2003, at 9:09 AM, Brian Webster wrote:

Are you sure you have the target/action of both tables hooked up in Interface Builder? Setting just the double action isn't enough, you must also have the table view's target connected as well. Note that doing this in Interface Builder would require you to connect a single-click action as well as a double click. If you want to do it programmatically instead, just do [myTable setTarget:self] in your awakeFromNib.

As an aside, action methods take a single argument, the sender of the action message. So in your example, you should have:

[myTable setDoubleAction:@selector(openFileInBrowser:)];

and

- (void)openFileInBrowser:(id)sender

If you don't use the sender for anything, then it doesn't technically matter, but it's good to be consistent with this sort of thing.

On Nov 17, 2003, at 10:00 AM, Kurt Marek wrote:

I'm having some trouble getting a an action to fire when a row is
double-clicked, but I can't figure out what the problem is. I have two
tableViews each being run by a different controller. One works fine
with a double click, but the other one doesn't seem to fire the method.

I have this is my awakeFromNib method for the controller:
[myTable setDoubleAction:@selector(openFileInBrowser)];

And then this implementation of the method:

-(void)openFileInBrowser {
NSLog(@"double Clicked table row");
//
}

The table is an outlet from the controller and it is hooked up
correctly in IB. I never get the output to the console. I can't quite
figure it out because I have the other table hooked up exactly the same
way and it seems to work fine. Any ideas on what I might be missing?

Kurt
_______________________________________________
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.


--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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.

References: 
 >setDoubleAction in tableView (From: Kurt Marek <email@hidden>)
 >Re: setDoubleAction in tableView (From: Brian Webster <email@hidden>)

  • Prev by Date: Re: Strange characters in Toolbar
  • Next by Date: undocumented classes
  • Previous by thread: Re: setDoubleAction in tableView
  • Next by thread: Re: setDoubleAction in tableView
  • Index(es):
    • Date
    • Thread