Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8011299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:58:54+00:00 2026-06-04T18:58:54+00:00

I have a NSTableView , i want to get the value present in the

  • 0

I have a NSTableView , i want to get the value present in the cell. I am having only one column so , i just need the row number

i can use this [tableView selectedRow]- but where do i put this i want to put this in a method that gets called on selection of any of the rows.

-(void)tableViewSelectionDidChange:(NSNotification *)notification{

NSLog(@"%d",[tableViewController selectedRow]);

}

The above method also does not work i am getting the error
-[NSScrollView selectedRow]: unrecognized selector sent to instance 0x100438ef0]

i want something like the method available in the iPhone tableview-

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath  {
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T18:58:55+00:00Added an answer on June 4, 2026 at 6:58 pm

    What is tableViewController object? Only NSTableView instances respond to selectedRow. You can get current table view (the one that sent the notification) from notification‘s object property:

    Objective-C:

    -(void)tableViewSelectionDidChange:(NSNotification *)notification{
        NSLog(@"%d",[[notification object] selectedRow]);
    }
    

    Swift:

    func tableViewSelectionDidChange(notification: NSNotification) {
        let table = notification.object as! NSTableView
        print(table.selectedRow);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an NSTableView that has one column of editable fields. Cell editing works
I have an NSTableView that I want to load it's value from an NSArrayController.
I have an NSTableView of which one column contains NSPopUpButtonCell s. This column is
I have a NSTableView and I want to disable row selection. The columns of
I have an NSTableView that contains 2 different Columns - one is an NSImageCell
I have an NSTableView with 4 columns. I want to change the auto resizing
I have an NSTableView that is displaying different views for each cell. How can
For my NSTableView, I have defined -tableView:toolTipForCell:rect:tableColumn:row:mouseLocation: and this does return the string I
I have an NSTableView that gets reloaded. While new data is loading, I want
I have an NSTableView and I have successfully implemented both tableView:validateDrop:proposedRow:proposedDropOperation: and tableView:acceptDrop:row:dropOperation: .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.