Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ANN] Nano 1.4



Hello,

Am 20.06.2007 um 14:20 schrieb Philip Aker:

On 2007-06-20, at 01:02:05, Mike Conley wrote:

And as long as I'm on the subject of those tagged parameters, what in hell is the point of those, anyway?

Amongst other things, it's the method signature -- which I think is a part of how the language knows which selector to target.

Only the number of method parameters matters as becomes obvious when creating an SEL reference (which you would want to use, e.g. to call the selector manually).


Imagine following methods:

- (void)justAMethod:(id)firstArgument;
- (void)justAMethod:(id)firstArgument anotherArgument:(id) secondArgument;
- (void)anotherMethod:(id)firstArgument anotherArgument:(id) secondArgument;


To obtain selectors (SEL) to those methods, you'd write in code:

SEL selector1 = @selector(justAMethod:);
SEL selector2 = @selector(justAMethod::);
SEL selector3 = @selector(anotherMethod::);

Therefore, you wouldn't be able to distinguish between

- (void)justAMethod:(id)firstArgument argVariant1:(id)secondArgument;
- (void)justAMethod:(id)firstArgument argVariant2:(id)secondArgument;

Both would boild down to

SEL selector4 = @selector(justAMethod::);
SEL selector5 = @selector(justAMethod::);


Best, Dirk Stegemann


_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: [ANN] Nano 1.4 (From: Mike Conley <email@hidden>)
 >Re: [ANN] Nano 1.4 (From: Philip Aker <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.