views:

28

answers:

2

Guys I'm using the code below. Xcode refuses to compile the last line. I get:

"error: expected ':' before '.' token"

on the last line. Can't figure out what is wrong...

- (void) failedTransaction: (SKPaymentTransaction *)transaction
{   
    if (transaction.error.code != SKErrorPaymentCancelled)      
    {       
        // Optionally, display an error here.       
    }   
    [[SKPaymentQueue defaultQueue] finishTransaction: transaction];
    [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
    [SelectorController.tableView reloadData];
}
+1  A: 

Could it be that your SelectorController is a class, not an instance of a class?

Douwe Maan
So you are saying it should be something like:SelectorController *selector;[selector.tableView reloaData];
I'm saying you should first get yourself an instance of `SelectorController`, by alloc-init-ing one, or by getting one from somewhere else.
Douwe Maan
+1  A: 

In your code, what is a SelectorController? Given the CamelCaseCapitalization, it looks like it's a class name. Perhaps somewhere else in your code you have a line that defines an instance of the SelectorController something like this:

SelectorController * selectorController;

In which case (pun intended) the problematic line should be:

[selectorController.tableView reloadData];
Jason Jenkins
Thanks but have already tried this. But this has given me an idea.