• 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: Sending the "value" message to an object typed "id"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sending the "value" message to an object typed "id"


  • Subject: Re: Sending the "value" message to an object typed "id"
  • From: Graham Cox <email@hidden>
  • Date: Tue, 8 Sep 2009 01:59:53 +1000


On 08/09/2009, at 1:31 AM, Paulo F. Andrade wrote:

At least from the UISlider class hierarchy there seems to be only one method named "value", no ambiguity there.


A further point - it's not the immediate class hierarchy that is searched. It's the entire namespace, which as you know is everything. And because the compiler uses the first version it encounters, that could well be a method buried deep in the low-level parts of any framework that is visible.

To check this, disassemble the code that's calling -value. If it's not using objc_msgSend_fpret then it's done the wrong thing. Compare the disassembly with casting sender to (UISlider*), where it will use objc_msgSend_fpret. Finding the actual method it has based its compilation around is harder (and only of academic interest) - you'll have to search the entire namespace.

--Graham


_______________________________________________

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: 
 >Sending the "value" message to an object typed "id" (From: "Paulo F. Andrade" <email@hidden>)
 >Re: Sending the "value" message to an object typed "id" (From: Graham Cox <email@hidden>)
 >Re: Sending the "value" message to an object typed "id" (From: "Paulo F. Andrade" <email@hidden>)

  • Prev by Date: Re: Symbolic Links in Snow Leopard
  • Next by Date: Re: Weird malloc error when dealing with lots of NSImage objects
  • Previous by thread: Re: Sending the "value" message to an object typed "id"
  • Next by thread: Re: Sending the "value" message to an object typed "id"
  • Index(es):
    • Date
    • Thread