Warnings

14 views
Skip to first unread message

Heath

unread,
Dec 15, 2009, 11:10:40 PM12/15/09
to UISpec
I'm new to UISpec, and I notice that I get a lot of selector warnings
when I use it. Are there recommended compiler settings to get rid of
them? The only setting I could find that was related was about
undeclared selectors, but that only applies to selectors found with
@selector.

Alternatively, if methods from UIQuery returned id instead of UIQuery,
the compiler might be a little happier.

Please tell me if I'm way off, I'm still a little noobish on ObjC.

Thanks.

-Heath

Brian

unread,
Dec 18, 2009, 10:55:05 AM12/18/09
to UISpec
Currently UISpec leverages the dynamic nature of Objective-C, mainly
the methodSignatureForSelector: and forwardInvocation: methods. This
is very similar to what you would find when doing meta-programming in
Ruby with method_missing. I have never found a way to turn the
warnings completely off...I just hide them in XCode so they don't show
up in the code. It's very strange to me that Objective-C provides all
this dynamic functionality but when you try to use it you are made to
feel like you are doing something wrong.

-Brian

KD

unread,
Jul 11, 2010, 12:42:32 PM7/11/10
to Brian, uis...@googlegroups.com
One way I found of hiding the warnings is to define an unnamed
category on UIQuery.

In each of the spec files, I add:

@interface UIQuery ()
...
...
@end

Add all the methods that give selector warnings here.

I know this is a bit more work, but I really am uncomfortable seeing
the warnings or turning off all warnings.

HTH

-- KD

PS: I could not find a way to just replay to the group. Hence the to:

On Dec 18 2009, 8:55 pm, Brian <btkn...@gmail.com> wrote:
> Currently UISpec leverages the dynamic nature of Objective-C, mainly
> the methodSignatureForSelector: and forwardInvocation: methods.  This
> is very similar to what you would find when doing meta-programming in

> Ruby with method_missing.  I have never found a way to turn thewarningscompletely off...I just hide them in XCode so they don't show

Heath Borders

unread,
Jul 11, 2010, 2:01:01 PM7/11/10
to uis...@googlegroups.com
Thanks. I thought of that too, but I was too lazy. I hope you'll
contribute this category back up to the project for others like me. :)
-Heath Borders
hbor...@mail.win.org
Twitter: heathborders
http://heath-tech.blogspot.com

> --
> You received this message because you are subscribed to the Google Groups "UISpec" group.
> To post to this group, send email to uis...@googlegroups.com.
> To unsubscribe from this group, send email to uispec+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/uispec?hl=en.
>
>

Robert Mathews

unread,
Jul 11, 2010, 3:16:37 PM7/11/10
to uis...@googlegroups.com
Likewise. I always read warnings - never know when you've misspelled a selector, and all those noisy warnings were getting in the way.
Reply all
Reply to author
Forward
0 new messages