Re: How do you create a NSTabViewItem containing NSImageView programmatically? I almost got it...
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