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: an0 <email@hidden>
- Date: Thu, 10 Jul 2008 21:49:35 +0800
Thanks. But isn't it annoying for XCode to pretend to know something
for sure while in fact it is just a wrong guess? At least the warning
is very misleading.
On Thu, Jul 10, 2008 at 9:31 PM, Graham Cox <email@hidden> wrote:
> 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