Re: addTabViewItem exception was:(no subject)
Re: addTabViewItem exception was:(no subject)
- Subject: Re: addTabViewItem exception was:(no subject)
- From: Jens Bauer <email@hidden>
- Date: Thu, 5 Feb 2004 22:12:47 +0100
Hi,
On Thursday, Feb 5, 2004, at 14:09 Europe/Copenhagen, J Nozzi wrote:
My apologies ... I realized as soon as I hit 'send'. Unfortunately,
it was out of my outbox before I could stop it. ;-)
As to your response, I see your addition of "if (anItem)", but other
than that, your code appears to do the same thing as mine. I am
allocating, then initializing an NSTabViewItem. Checking for a valid
reference is one thing, but making a valid reference in the first
place is what I appear to be having trouble with.
On Thursday, Feb 5, 2004, at 04:46 Europe/Copenhagen, J Nozzi wrote:
NSTabViewItem * anItem = [[NSTabViewItem alloc] initWithIdentifier
@"all"];
anItem is NULL, when you try to add it.
-It didn't get allocated.
I can't guess why it isn't allocated.
Try splitting it up in smaller lines:
NSTabViewItem *anItem;
anItem = [NSTabViewItem alloc];
printf("anItem after alloc:0xx\n", anItem);
anItem = [anItem initWithIdentifier:@"all"];
printf("anItem after init:0xx\n", anItem);
-I just noticed that you're missing out a colon after
"initWithIdentifier"; ofcourse, if you didn't copy/paste from your
sources, this wouldn't be the source of the problem...
Love,
Jens
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.