Got it.

Thank you!

Paulo F. Andrade



On 2009/09/07, at 16:51, Graham Cox wrote:

Yes, but the return type will cause different compilation of objc_msgSend. There are several variants of that (obc_msgSend_fpret, objc_msgSend_stret, etc) depending on which registers are expected to return what sorts of values - structs vs. floats vs. integers/ objects for example. So the right method will get called but within the wrong context of what will be returned. You can verify this yourself by disassembling some variants of calling a test method - if only the return type varies and the compiler can't disambiguate based on class of the receiver, it will compile the first version it finds.

What's probably occurring in your case is that the compiler has used a version (such as -(id) value) that returns its value in a certain register, whereas the -(float) value method returns it in a different register (an fp register, generally). It just so happens that the register that the caller pulls the result from holds the slider object.

_______________________________________________

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