Note that there are some explanatory texts on larger screens.

plurals
  1. POXcode ignores some of my lines
    primarykey
    data
    text
    <p>I have a part in my code that calls a method on a different class.</p> <p><strong>The different class is a singleton.</strong></p> <p>I didn't have any issues with this <code>class</code> until <code>today</code>, everything worked properly. I don't know why, but after a few insignificant changes i've made <code>today</code>, the code seems to ignore some of my code. It seems that everything is ok and it passes through all the lines but if i put a breakpoint inside one of the methods in my singleton class, it doesn't stop. It just doesn't call those methods.</p> <p><strong>Does anyone has an idea why could that be?</strong></p> <p>I tried cleaning the project, tried quitting <code>Xcode</code>, nothing helped so far.</p> <p>This is an example of how my method in my singleton ".m" looks like:</p> <pre><code>-(void)setUserCurrentLocationWithLatitude:(NSNumber *)latitude andLongitude:(NSNumber *)longitude andUserIndex:(NSNumber *)userIndex{ NSMutableArray* tempPlayersArray = [NSMutableArray arrayWithArray: [[NSUserDefaults standardUserDefaults] arrayForKey: @"kgpsUsersArray"]]; NSMutableDictionary * userTempDict = [[NSMutableDictionary alloc] initWithDictionary:[tempPlayersArray objectAtIndex:[userIndex integerValue]]]; NSLog(@"latitude = %f",[latitude floatValue]); [userTempDict setObject:latitude forKey:@"latitude"]; [userTempDict setObject:longitude forKey:@"longitude"]; [defaults setObject:tempPlayersArray forKey:@"kgpsUsersArray"]; [defaults synchronize]; } </code></pre> <p>And this is how it is defined in ".h" file:</p> <pre><code>-(void)setUserCurrentLocationWithLatitude:(NSNumber *)latitude andLongitude:(NSNumber *)longitude andUserIndex:(NSNumber *)userIndex; </code></pre> <p>And in my viewController.m file the singleton is being called initialized like this:</p> <pre><code>#import "PlayersData.h" usersData = [PlayersData sharedInstance]; </code></pre> <p>and the method is called like this:</p> <pre><code>[usersData setUserCurrentLocationWithLatitude:[NSNumber numberWithFloat:32.125493] andLongitude:[NSNumber numberWithFloat:34.858962] andUserIndex:[NSNumber numberWithInt:j]]; </code></pre> <p>Thanks,</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload