Re: Help with implementing delegates



On Fri, Mar 27, 2009 at 4:48 PM, Drew Lawson <drew@xxxxxxxxxx> wrote:
> According to Greg Guerin:
>
>> albert jordan Mobility wrote:
>>
>> > In Foo, I have set up the following delegate method
>> >
>> > -(void) test: (dgtest *) sender:didFinish: (BOOL) complete
>>
>> Over-colonization?  Try:
>>
>>    -(void) test: (dgtest *) sender  didFinish: (BOOL) complete
>>
>> Note the removal of the colon between sender and didFinish.
>>
>> Also note your original is not illegal, so the compiler won't
>> complain about it.
>
> You just gave me a newbie headache.
> How is that original parsed?

(void) test:(dgtest*)sender :(id)didFinish :(BOOL)complete

With the second ":" and third ":" being unlabled arguments if IIRC.

http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocObjectsClasses.html#//apple_ref/doc/uid/TP30001163-CH11-SW6

-Shawn
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@xxxxxxxxxxxxxxx)

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/maillists%40codeha.us

This email sent to maillists@xxxxxxxxx

...



Privacy