I'm working with the Parse SDK for my project. It first displays a list of Categories in a PFQueryTableView. On selecting a category it displays the sub categories associated to the selected category, also in a PFQueryTableView. This sub category class has a pointer value to the first Categories class.
In the sub category view, I have an option to add a new subcategory. What I would like to do is to add a new row to the sub categories table but have it linked to the Categories class that was just selected. i.e. link it to the pointer "Cat" in the sub categories table.
PFObject *newWord = [PFObject objectWithClassName:@"words"];
newWord[@"word"] = self.wordTextField.text;
newWord[@"user"] = [PFUser currentUser];
newWord[@"Cat"] = @"Categories";
[newWord saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
if (succeeded) {
} else {
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error!"
message:[error.userInfo objectForKey:@"error"]
delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertView show];
}
}];
I keep getting this error:
[Error]: invalid type for key Cat, expected *Categories, but got string (Code: 111, Version: 1.8.0)
Anyone know what the problem is? Or how I can solve this to link to the pointer in my table?

Categoriesobject with something likePFObject *categories = [PFObject objectWithClassName:@"Categories"];, filling it in and then assigning it tonewWord[@"Cat"];.