• 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: How do you create a NSTabViewItem containing NSImageView programmatically? I almost got it...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you create a NSTabViewItem containing NSImageView programmatically? I almost got it...


  • Subject: Re: How do you create a NSTabViewItem containing NSImageView programmatically? I almost got it...
  • From: "Frederick C. Lee" <email@hidden>
  • Date: Thu, 21 Oct 2004 18:27:47 -0700

You are CORRECT!
I've changed the NSNumber to NSString, using an arbitrary @"foo" and test it for one new TAB. The 'selector not recognized' error went away!

Original:
NSNumber *myNum = [[NSNumber alloc] initWithInt:numberOfTabs];
NSTabViewItem *tabViewItem = [[NSTabViewItem alloc] initWithIdentifier:MyNum];

Modified:
NSTabViewItem *tabViewItem = [[NSTabViewItem alloc] initWithIdentifier:@"foo"];

So apparently this must be a bug!

I'll file a bug report when I find the URL for it.

Thanks for the insight!

Regards,

Ric.

On Oct 21, 2004, at 3:57 PM, Scott Stevenson wrote:

On Oct 21, 2004, at 3:41 PM, Frederick C. Lee wrote:

2004-10-21 12:22:28.786 ricCountries[961] *** -[NSCFNumber length]: selector not recognized
2004-10-21 12:22:28.787 ricCountries[961] *** -[NSCFNumber length]: selector not recognized

This looks like something is expecting an NSString but getting an NSNumber. Try using an string for the tab identifier instead of a number.

[NSString stringWithFormat:@"%i", someInt];

The API indicates "id" as the identifier type so NSNumber should be okay, but it could be a bug. Not sure if this will work but worth a try.

- Scott



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: How do you create a NSTabViewItem containing NSImageView programmatically? I almost got it...
      • From: "M. Uli Kusterer" <email@hidden>
  • Prev by Date: NSTableView Cell Selection for Contextual Menu
  • Next by Date: confused about framework headers
  • Previous by thread: Re: How do you create a NSTabViewItem containing NSImageView programmatically? I almost got it...
  • Next by thread: Re: How do you create a NSTabViewItem containing NSImageView programmatically? I almost got it...
  • Index(es):
    • Date
    • Thread