• 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: class dispatch table has duplicate names right?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: class dispatch table has duplicate names right?


  • Subject: Re: class dispatch table has duplicate names right?
  • From: "Clark S. Cox III" <email@hidden>
  • Date: Wed, 9 Jul 2003 09:58:16 -0400

On Wednesday, July 09, 2003, at 09:36, Ben Dougall wrote:

from the obj-c pdf pg 88:

A class dispatch table. This table has entries that associate method selectors with
the class-specific addresses of the methods they identify. The selector for the
setOrigin:: method is associated with the address of (the procedure that
implements) setOrigin::, the selector for the display method is associated with
displays address, and so on.

i don't quite understand this because methods of the same name can be implemented within multiple classes.

If you look up a couple of lines on that same page, you'll see that paragraph put into context:

-------------
The key to messaging lies in the structures that the compiler builds for each class and object. Every class structure includes these two essential elements:

■A pointer to the superclass.

■A class dispatch table. This table has entries that associate method selectors with the class-specific addresses of the methods they identify. The selector for the setOrigin:: method is associated with the address of (the procedure that implements) setOrigin::, the selector for the display method is associated with display’s address, and so on.
---------

So, every class has it's own class dispatch table.

--
http://homepage.mac.com/clarkcox3/
email@hidden
Clark S. Cox, III
_______________________________________________
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: class dispatch table has duplicate names right?
      • From: Ben Dougall <email@hidden>
    • Re: class dispatch table has duplicate names right?
      • From: Ben Dougall <email@hidden>
References: 
 >class dispatch table has duplicate names right? (From: Ben Dougall <email@hidden>)

  • Prev by Date: Re: class dispatch table has duplicate names right?
  • Next by Date: Re: NSTableView with images
  • Previous by thread: Re: class dispatch table has duplicate names right?
  • Next by thread: Re: class dispatch table has duplicate names right?
  • Index(es):
    • Date
    • Thread