• 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: Chris Hanson <email@hidden>
  • Date: Tue, 22 Apr 2003 16:45:26 -0500

At 9:02 AM -0700 4/22/03, MarketLogix Developer wrote:
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.

Not true. (Unless I misunderstand what you're saying.)

If you write

@interface Foo
{ }
@end

you've declared a new root class, not a subclass of NSObject or Object. You have to explicitly specify a superclass if you want to create a subclass. If you're doing Cocoa development, you should generally be subclassing NSObject or one of its subclasses, or if you're creating a new root class it should implement the NSObject protocol.

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 ?

This appears to indicate that GDB's Objective-C support was written assuming any object it could manipulate implements the NSObject protocol.

-- Chris

--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Application Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
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.

  • Follow-Ups:
    • Re: What's with these redundant methods ?
      • From: Jonathan Hendry <email@hidden>
    • Re: What's with these redundant methods ?
      • From: MarketLogix Developer <email@hidden>
References: 
 >What's with these redundant methods ? (From: MarketLogix Developer <email@hidden>)

  • Prev by Date: Re: Rendez-vous ...
  • Next by Date: RE: Membership - ADC Q&A
  • Previous by thread: Re: What's with these redundant methods ?
  • Next by thread: Re: What's with these redundant methods ?
  • Index(es):
    • Date
    • Thread