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: Johan Kool <email@hidden>
- Date: Thu, 10 Jul 2008 17:54:46 +0200
filteredPosts = [[self filterPosts:postNodes WithTag:[[tagView
itemAtRow:row] tag]] retain];
You don't tell the compiler what is returned by -(id)itemAtRow: so the
compiler doesn't know wether to expect "you" or "your brother". You
should tell it whom to expect and it won't complain anymore.
filteredPosts = [[self filterPosts:postNodes WithTag:[(RedCocoa
*)[tagView
itemAtRow:row] tag]] retain];
Johan
Op 10 jul 2008, om 16:50 heeft an0 het volgende geschreven:
We are Cocoa family. I am a RedCocoa, and my elder brother is a
BlackCocoa. We both have a `pet', but our Dad doesn't. My pet is a
Cat, while my elder brother's pet is a Dog. And of course he got his
pet long before me, for he is 10 but I am only 2. So as a Cocoa, am I
supposed to have a pet Dog just because my elder brother has one? And
should I be accused of lying every time I say I have a pet Cat?
On Thu, Jul 10, 2008 at 10:10 PM, I. Savant
<email@hidden> wrote:
On Thu, Jul 10, 2008 at 9:49 AM, an0 <email@hidden> wrote:
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.
How is this XCode's fault, exactly? You appear to be blaming the IDE
for the idiosyncrasies of a dynamically-typed language combined with
your own lack of specificity. We'll leave alone the fact that
XCode !=
gcc ...
As far as the warning goes, it isn't misleading at all - it's
telling you exactly what's happening. That it's "alright" in this
case
can't be known by anybody but the developer with the information the
compiler has (unspecific type).
--
I.S.
_______________________________________________
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
---
http://www.johankool.nl/
_______________________________________________
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