• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What's with these redundant methods ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's with these redundant methods ?


  • Subject: Re: What's with these redundant methods ?
  • From: Henry McGilton <email@hidden>
  • Date: Tue, 22 Apr 2003 09:22:52 -0700

On Tuesday, April 22, 2003, at 09:02 AM, MarketLogix Developer wrote:

Hi.

In continuing with my ports to OS X I have come across an 'interesting' situation with gdb.
When trying to gdb-execute a method like [myCollection count] to inspect the retval, I got
a MyCollection class does not recognize -> respondsToSelector: and methodForSelector: .

Well, true I do not implement those but Object from the ObjC runtime does implement
respondsTo: and methodFor: and any class that I implement will inherit from Object and
so inherit these. I worked around this gdb stopper by implementing respondsToSelector:
and methodForSelector: in a category where they simply call respondsTo: and methodFor: .

Why do we now have 2 different implementations of the EXACT same darn method ?

What other silly gdb only (re)implementaions can I expect ?


Without actually seeing your code, I can take a SWAG:

Your statement

'. . . and any class that I implement will inherit from
Object and so inherit these . . . '

is true only if you explicitly state in the @interface section
that your class actually *does* inherit from NSObject, like
this:

@interface Instrumentality : NSObject

If you do not specify the superclass explicitly, your class
is its own root class.

Best Wishes,
........ Henry


===============================+============================
Henry McGilton | Trilithon Software
Boulevardier, Java Composer | Seroia Research
-------------------------------+----------------------------
mailto:email@hidden | http://www.trilithon.com
===============================+============================
_______________________________________________
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.

References: 
 >What's with these redundant methods ? (From: MarketLogix Developer <email@hidden>)

  • Prev by Date: What window is the mouse over?
  • Next by Date: Newbie: Help with drawing images please
  • Previous by thread: Re: What's with these redundant methods ?
  • Next by thread: Re: What's with these redundant methods ?
  • Index(es):
    • Date
    • Thread