• 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: When you send a message to an object, how does it find the corresponding method?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When you send a message to an object, how does it find the corresponding method?


  • Subject: Re: When you send a message to an object, how does it find the corresponding method?
  • From: Charles Steinman <email@hidden>
  • Date: Sun, 5 Aug 2007 01:47:29 -0700 (PDT)

--- Bob Ueland <email@hidden> wrote:

> When you send a message to an object, how does it
> find the corresponding method? I have a very vague
> and unclear picture of what happens.
>
> [SNIP]
>
> A message is sent to Fraction. But Fraction is not
> an object, itÂ’s a class? I know you can send
> messages to objects but here we are sending to a
> class. Maybe Objective-C treats classes just like
> objects. In that case I have a class-object on the
> heap. But who created that object. In my code I
> never asked for allocation of memory for a
> class-object, so the compiler must have created it
> on its own. Maybe as soon as it sees that I have
> defined a new class it automatically creates one
> class-object which later lives in the heap.

I suggest you read the doc called The Objective-C
Programming Language on Apple's site. It covers how
messaging works as well as the fact that classes are
real objects in Objective-C.

http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Introduction/chapter_1_section_1.html

Cheers,
Chuck



____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >When you send a message to an object, how does it find the corresponding method? (From: Bob Ueland <email@hidden>)

  • Prev by Date: When you send a message to an object, how does it find the corresponding method?
  • Next by Date: Re: offtopic: best way of plainng overall structure of programs/functions etc.
  • Previous by thread: When you send a message to an object, how does it find the corresponding method?
  • Next by thread: Re: When you send a message to an object, how does it find the corresponding method?
  • Index(es):
    • Date
    • Thread