Re: Problem Instantiating a Nib
Re: Problem Instantiating a Nib
- Subject: Re: Problem Instantiating a Nib
- From: Bruce Truax <email@hidden>
- Date: Tue, 11 May 2004 14:04:16 -0400
I did manage to solve your problem and you can add one more thing to your
list. The problem was related to a corrupted popup menu. I copied the menu
from another nib and pasted it into this one. The parameter in the info box
all looked correct and in the popup appeared to work. Just for fun, and
because I had tried everything else I tested the nib using the IB "Test
Interface" function. When I tried to click on the popup nothing happened
although there was a small corrupted area of the bit map. Hmm..., it seemed
I was onto something. I then went back to IB, deleted the popup, added a
new one, configured it and connected it and it worked!
I hate these kind of bugs because you cannot find them by debugging.
Thanks for the other two suggestions. I will file them for future
reference.
Regards,
Bruce
On 5/11/04 12:55 PM, "Fritz Anderson" <email@hidden> eloquently
wrote:
>
My experience with "selector not recognized" is that it indicates one
>
of two things:
>
>
1. I'm explicitly sending a message to an object that doesn't implement
>
the message. The selector may be misspelled, or missing a colon, or
>
simply drawn from my fevered imagination. I can catch this at, or near
>
enough to, the error by setting a breakpoint at "-[NSException raise]".
>
>
That your application seems to be throwing these errors in the middle
>
of framework code, and is continuing execution having merely aborted
>
the NIB load, suggests that this isn't your problem.
>
>
2. The other cause is that I've released an object prematurely, and its
>
pointer value has been reused for another object, which happens not to
>
implement the selector. Check for an unretained autoreleased object
>
(for example). NSZombieEnabled (do a Google search and look in
>
NSDebug.h) will help; it's a memory-management diagnostic that catches
>
exactly this sort of thing.
>
>
-- F
>
>
On 9 May 2004, at 9:24 PM, Bruce Truax wrote:
>
>
> At the time I execute the loadNibNamed method I can see in the
>
> debugger that
>
> the +initialize function is executed and the immediately after this
>
> function
>
> is executed I get the following two messages:
>
>
>
> 2004-05-09 22:22:19.373 AccosX[4077] *** -[NSConstantString count]:
>
> selector
>
> not recognized
>
> 2004-05-09 22:22:19.378 AccosX[4077] *** -[NSConstantString count]:
>
> selector
>
> not recognized
>
>
>
> And the awakeFromNib method is never executed.
>
>
>
--
>
Fritz Anderson
>
Consulting Programmer
>
http://resume.manoverboard.org/
_______________________________________________
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.