Skip navigation.
 
mlRe: performSelectorOnMainThread
FROM : Sean McBride
DATE : Thu Jul 20 17:44:08 2006

On 2006-07-20 07:43, James Bucanek said:

>You're probably running into the subtleties of Cocoa message naming.
>This one trips me up at least once a week:
>
>    @selector(myMethod) is the selector for - (void)myMethod;
>   
>    @selector(myMethod:) is the selector for - (void)myMethod:(id)param;
>   
>Note the colon. It's important.


This trips a lot of people up, but gcc can warn when you use an
undeclared selector.  Sadly, Xcode provides no GUI for this warning, but
you can pass the "-Wundeclared-selector" flag to gcc, and then you'll get:

warning: undeclared selector 'myMethod'

--
____________________________________________________________
Sean McBride, B. Eng                <email_removed>
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada

Related mailsAuthorDate
mlperformSelectorOnMainThread Eric Blanpied Jul 20, 16:04
mlRe: performSelectorOnMainThread Buddy Kurz Jul 20, 16:40
mlRe: performSelectorOnMainThread James Bucanek Jul 20, 16:43
mlRe: performSelectorOnMainThread Sean McBride Jul 20, 17:44
mlRe: performSelectorOnMainThread Eric Blanpied Jul 20, 20:07