>
>
> It might help the rest of us if you state your goals here, because I can't
> see any reason to use object_setInstanceVariable() unless you are doing
> something very low-level or non-standard.
>
>
I found this code in some test cases where the property of the testing
class was not exposed. I find myself in the same position sometimes but
never opted to use objc runtime functions for testing. I agree this is too
much low-level and non-standard to some point. I usually use KVO or simply
expose the getter/setter for testing purposes.

Thanks a lot.
_______________________________________________

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

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

Reply via email to