Reputation: 1
I'm trying to UnArchive into an NSMutableArray
. This statement gives me an 'Lvalue required as left operand of assignment'
[[[VariableStore sharedInstance] riskValues] = [NSKeyedUnarchiver unarchiveObjectWithFile:[self archivePath]]];
The NSMutableArray
is declared in the VariableStore
singleton. Any ideas, anyone please?
Upvotes: 0
Views: 350
Reputation: 789
You can't assign values like that, you would need a setter method...
[[VariableStore sharedInstance]setRiskValues:[NSKeyedUnarchiver unarchiveObjectWithFile:[self archivePath]]];
Upvotes: 1
Reputation: 5098
You should use a setter:
[VariableStore sharedInstance].riskValues = [NSKeyedUnarchiver unarchiveObjectWithFile:[self archivePath]];
Or:
[[VariableStore sharedInstance] setRiskValues:[NSKeyedUnarchiver unarchiveObjectWithFile:[self archivePath]]];
Upvotes: 0