Resolved NSMutableArray error I don't understand

Discussion in 'Mac Programming' started by Richard Birkett, Dec 19, 2011.

  1. Richard Birkett macrumors member

    Aug 21, 2011
    I have this code:

    - (void)multiplyWithPrimeFactor:(RBMPrimeFactor *)thePrimeFactor
    	bool success = false;
    	for (RBMPrimeFactor *factor in primeFactors) {
    		if (factor.primeNumber == thePrimeFactor.primeNumber) {
    			factor.exponent += thePrimeFactor.exponent;
    			success = true;
    	if (!success) {
    		[primeFactors addObject:thePrimeFactor];
    I have studied it with breakpoints to the best of my ability. When the execution reaches the if it gets an error about using the primeFactor selector. Both 'factor' and 'thePrimeFactor' appear in the bug area to be valid 'RBMPrimeFactor's with valid integer primeFactor iVars. Here is the top of the error:

    If you would like to see more code or error text I will reply asap.


    Really sorry, my problem was that I had @dynamic properties without implementation, such an idiot! Sorry.


Share This Page