On Jul 29, 2008, at 7:41 PM, Torsten Curdt wrote:
So I did't get why this should be ambiguous because NSApp obviously can't be of type id. Well turns out - it actually is. And now it all makes sense again :)

I've just replaced [NSApp ..] with [[NSApplication sharedApplication] ...]

Glad you have a solution!

NSApp is of type (id) because it is not uncommon -- though not the rule, either -- that applications will subclass NSApplication as their primary application class (settable in the build settings inspector of your Application's target in XCode).

Thus, by typing it of type (id), the compiler will complain of ambiguities like the one you encountered.

In general, there shouldn't be any such ambiguities. Objective-C does not mangle the names together with the argument types. There is a single flat namespace for all method names in your application's runtime. The "name" is just the selector, no argument types.

b.bum

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to