Re: class_addMethod and type encodings.
Re: class_addMethod and type encodings.
- Subject: Re: class_addMethod and type encodings.
- From: Jens Alfke <email@hidden>
- Date: Thu, 1 May 2008 21:21:44 -0700
On 1 May '08, at 7:29 PM, Ross Tulloch wrote:
1) class_addMethod requires a types array. This array describes the
types of the arguments to the method. The type encodings page simply
states that this info "assists the runtime". I'm wondering how (and
when) this type information is used by the runtime? In my testing
I've found the added methods work fine even if you pass an empty
types string. How bad an idea is passing an empty types string?
The types are used by NSMethodSignature, which in turn gets used by
NSInvocation and DistributedObjects, and probably other things.
3) The only doco I can find for type encodings in ObjC is the
"Runtime System > Type Encodings" page. Is there any other doco I
should be reading?
The docs I know of are down in the GCC documentation, in the "compiler
extensions for Objective-C" section. It's buried somewhere in the
reference library in /Developer.
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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