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

  • SEARCH
  • Home
  • 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 9104567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:54:00+00:00 2026-06-17T01:54:00+00:00

i have a NSTableView on a window, the data is populated using a NSMutableArray

  • 0

i have a NSTableView on a window, the data is populated using a NSMutableArray and that is Ok

after selecting a rows, when i check in code

[myTableView selectedRow];

or

[myTableView clickedRow];

both return null

Can anyone help?

  • 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-17T01:54:02+00:00Added an answer on June 17, 2026 at 1:54 am

    selectedRow and clickedRow each return an NSInteger, not an object. They’re returning 0, which is the index of the first row.

    If you print 0 as if it were an object (e.g., with NSLog(@"%@", [myTableView selectedRow])), it will print as nil, simply because that’s what nil is: 0 as an object pointer.


    Of course, this assumes that myTableView actually refers to a table view in the first place. If myTableView does not yet point to a table view (i.e., the myTableView variable itself holds nil), any message to it will in turn return 0 (which, again, looks like nil if you treat it as an object).

    If selectedRow returns 0 when the first row isn’t selected or there are no rows, or clickedRow returns 0 when the first row hasn’t been clicked, make sure myTableView points where you expect it to.

    (I’m deliberately leaving the more specific explanation of the problem and its solution to you, Jaggu, since you said in the comments that you found it already.)

    • 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 contains a few columns that are populated with data.
I have an NSTableView that is done using the typical IB and data bindings.
I have an NSTableView that I add objects to (through core data). I came
I have an NSTableView that is populating with my data source. My data model
I have an NSTableView that gets reloaded. While new data is loading, I want
I have an NSTableView whose data source is an NSMutableArray. The count of the
I have an NSTableView that I am trying to sort. The data source is
I have an NSTableView that has a single column, with rows that contain a
I have a NSTableView that holds a name to all of my NSImageView's, and
Ok, I have an NSTableView in my window in Interface Builder and I'd like

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.