Re: LoadNib not working
Re: LoadNib not working
- Subject: Re: LoadNib not working
- From: Cyril Godefroy <email@hidden>
- Date: Wed, 6 Jun 2001 10:33:25 +0200
I was certainly not clear enough in my last email regarding the problem
I'm facing, nor about what directions I wanted.
The problem is not classic in what it does or does not. Because the code
shown hereafter 'works'. But it doesn't do what it's supposed to.
I have checked that this method was really called, and it is. As you can
see, I also check that loadNibNamed doesn't return null, which it does
not.
But still the nib is not shown. That's why I say it 'works' but doesn't
do what it's supposed to do (in a simple plain app alike).
We could have a discussion regarding the difference between 'works' and
'doesn't do what it's supposed to do, so I'll use another word: valid.
Regarding the bundle vs NSBundle discussion: I'm passing a bundle as an
argument because it's not the Main Bundle, but the bundle for the
dockling (same bundle I use to load images etc). So the code that Eric
Peyton sent me is basically doing the same thing as this, although I'll
keep it in one of my brain cells for future reuse. And it does indeed
after some test.
How can I test a nib if I don't see it? I have very little debugging
tools with docklings (mostly NSLog, what a debugger!). And don't talk
about gdb, I'll never be able to use it...
Or is it a special checkbox in IB that I didn't check.
As I said, I never had that kind of problem in my more classic tryouts
in Cocoa
Thanks for guesses.
>
> - (void)showCountDown:(NSBundle*)bundle
>
> {
>
> if (![[bundle class] loadNibNamed:@"CountDown" owner:self]) {
>
> NSLog(@"Failed to load CountDown.nib");
>
> NSBeep();
>
> return;
>
> }
>
> }
>
>
>
> Cyril Godefroy
>
> homepage.mac.com/cgodefroy
>
> _______________________________________________
>
> cocoa-dev mailing list
>
> email@hidden
>
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev