Newbie Issue: isDescendantOf: error
-
I am working through Aaron Hillegass's book currently in Chapter 10:
Using the Defaults, and I am getting this error when trying to bring
up my Preferences panel.
[PreferenceController isDescendantOf:]: unrecognized selector sent to
instance 0x103eb70
My troubleshooting got me as far as realizing there is a problem with
the line
self = [super initWithWindowNibName:@"Preferences"];
but I'm not sure where to go from there. I'm sure this is a newbie
problem, but I'm stumped. If anyone can offer pointers that'd be
great. Also, if you can enlighten me as to how I could have figured
this out on my own, that would be awesome. You know, teach a man to
fish and all that.
Thanks,
Jamie -
On 14 Feb 2008, at 17:29, Jamie Phelps wrote:
> I am working through Aaron Hillegass's book currently in Chapter 10:
> Using the Defaults, and I am getting this error when trying to bring
> up my Preferences panel.
>
> [PreferenceController isDescendantOf:]: unrecognized selector sent
> to instance 0x103eb70
>
> My troubleshooting got me as far as realizing there is a problem
> with the line
>
> self = [super initWithWindowNibName:@"Preferences"];
I see no problems with this line. Presumably somewhere in you code is
calling the method -isDescendantOf: Can you find that code and post it?
>
>
> but I'm not sure where to go from there. I'm sure this is a newbie
> problem, but I'm stumped. If anyone can offer pointers that'd be
> great. Also, if you can enlighten me as to how I could have figured
> this out on my own, that would be awesome. You know, teach a man to
> fish and all that.
>
> Thanks,
> Jamie
-
On Feb 14, 2008, at 12:07 PM, Mike Abdullah wrote:
> I see no problems with this line. Presumably somewhere in you code
> is calling the method -isDescendantOf: Can you find that code and
> post it?
I cannot find any instance of this method call anywhere in my code.
One of the Challenges in the text was to implement an NSTabView. By
removing the NSTabView, the NSPanel displays correctly.
Why would the NSTabView cause this issue?
JP -
--- Jamie Phelps <jrphelps...> wrote:
> On Feb 14, 2008, at 12:07 PM, Mike Abdullah wrote:
>
>> I see no problems with this line. Presumably
> somewhere in you code
>> is calling the method -isDescendantOf: Can you
> find that code and
>> post it?
>
> I cannot find any instance of this method call
> anywhere in my code.
> One of the Challenges in the text was to implement
> an NSTabView. By
> removing the NSTabView, the NSPanel displays
> correctly.
>
> Why would the NSTabView cause this issue?
It sounds like you're accidentally using
PreferencesController somewhere you should be using a
view. isDescendantOf: is an NSView method, and it's
probably being sent by the tab view.
Cheers,
Chuck
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -
On Feb 14, 2008, at 12:48 PM, James Hober wrote:
> Hi Jamie,
>
> Did you select "Find in project..." from the Find menu in XCode and
> type "isDescendantOf" into the search field. Better than just
> looking through your code yourself.
>
> James
Thanks, James. I hadn't tried that but it still didn't turn anything up. -
So what I would do is set a breakpoint on these 2:
objc_exception_throw
-[NSException raise]
(Type them just like that!)
You can then see in the debugger how the code came to be calling -
isDescendantOf:
Mike.
On 14 Feb 2008, at 18:26, Jamie Phelps wrote:
> On Feb 14, 2008, at 12:07 PM, Mike Abdullah wrote:
>
>> I see no problems with this line. Presumably somewhere in you code
>> is calling the method -isDescendantOf: Can you find that code and
>> post it?
>
> I cannot find any instance of this method call anywhere in my code.
> One of the Challenges in the text was to implement an NSTabView. By
> removing the NSTabView, the NSPanel displays correctly.
>
> Why would the NSTabView cause this issue?
>
> JP
-
On Feb 14, 2008, at 12:46 PM, Charles Steinman wrote:
> It sounds like you're accidentally using
> PreferencesController somewhere you should be using a
> view. isDescendantOf: is an NSView method, and it's
> probably being sent by the tab view.
I knew it was a newbie problem. I apparently dropped the widgets into
an NSTabViewItem rather than into the NSView that it contains. Carry
on, folks! :D
JP



