Re: Why can't I name a property `tag'?
Re: Why can't I name a property `tag'?
- Subject: Re: Why can't I name a property `tag'?
- From: Graham Cox <email@hidden>
- Date: Thu, 10 Jul 2008 23:31:10 +1000
I ran into this a while back. Basically if the method names only
differ by return type and there is nothing else to go on (like a
concrete object pointer type) the compiler, without complaining,
plumps for the first one it can find, which invariably is Cocoa's
built-in methods and not yours.
The return type is not part of the method signature.
You have two choices:
a) rename your property something else
b) type the object explicitly where used, and don't use id.
hth,
Graham
On 10 Jul 2008, at 11:25 pm, an0 wrote:
what makes XCode think the `tag' property of the item is an NSInteger?
_______________________________________________
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