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 3501030
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:48:29+00:00 2026-05-18T12:48:29+00:00

I have four tabViewItems, with identifiers 1, 2, 3, and 4 assigned in IB,

  • 0

I have four tabViewItems, with identifiers 1, 2, 3, and 4 assigned in IB, and then set up as constants, i.e.:

#define kTabViewSubject     1

When testing which tabViewItem is selected, it works to treat the identifiers as NSNumbers, like this:

if ([self.drawerTabView selectedTabViewItem] identifier] intValue]]] == kTabViewSubject])
// do something

But when selecting a tabViewItem, if I treat the same identifier as an NSNumber, like this…

[self.drawerTabView selectTabViewItemWithIdentifier:[NSNumber numberWithInt:kTabViewSubject]];

… the identifier is evaluated as a huge address-like number and I get a “beyond bounds” exception.

What works is to treat the identifier as an NSString, like this:

#define kTabViewSubjectX        @"1"
// --
[self.drawerTabView selectTabViewItemWithIdentifier:kTabViewSubjectX];

I understand NSTabViewItem’s identifier property is set up as a generic “id.” But why is it inconsistently classed?

  • 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-05-18T12:48:30+00:00Added an answer on May 18, 2026 at 12:48 pm

    intValue is a method of NSString as well as NSNumber. The identifiers were strings all along.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want set wallpaper.I have four options.By Daily,by day of week(e.g >every Sunday ),by
I have four points: a=(-0.5, -0.5) b=(-0.5, 0.5) c=(0.3, -0.5) d=(0.0, 1.0) I need
I have four session variables-- location = request.session['location'] computer = request.session['computer'] phone = request.session['phone']
I have four divs that are draggable. And a div where I drop the
Say if I have four functions as below: def foo(): subprocess.Popen('start /B someprogramA.exe', shell=True)
Using before_create to see if the record exists. Have four variables/columns (alpha, beta, delta,
I have an application with a tab bar as the root controller. I have
I'm using the mclapply function in the multicore package to do parallel processing. It
Possible Duplicates: Interface vs Base class When should I choose inheritance over an interface
Since this question is about the increment operator and speed differences with prefix/postfix notation,

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.