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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to