views:

108

answers:

2

I expect this to work based on the docs here: http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocSelectors.html

SEL sel = @selector(loadMapType:[ms uniqueTilecacheKey]);

"error: expected ')' before '[' token"
+7  A: 
[ms uniqueTilecacheKey]

That's what's wrong. A selector is essentially just a method signature, so you don't pass it parameters.

It should instead look like

SEL sel = @selector(loadMapType:);
jbrennan
+1  A: 

The compiler gave you the answer. It was expecting the close parenthesis to complete the @selector() directive, not a message expression. Think of the selector as the name of the method.

NSResponder