Re: method naming
Re: method naming
- Subject: Re: method naming
- From: Bill Bumgarner <email@hidden>
- Date: Tue, 29 Jul 2008 20:16:07 -0700
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 (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