Note that there are some explanatory texts on larger screens.

plurals
  1. POtableview editing crash application in iphone?
    primarykey
    data
    text
    <p>in app i have custom <code>tableview(UITableView *tableView)</code> which subclass of uiviewcontroller &amp; in tableview editing is show perfectly but when i delete row </p> <pre><code>- (void)tableView:(UITableView *)tableView1 commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { // Delete the row from the data source //[appDelegate deleteItemAtIndexPath:indexPath]; [self testing:indexPath]; [tableView deleteRowsAtIndexPaths: [NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];//in this line app crash NSLog(@"delete row"); [tableView reloadData]; } else if (editingStyle == UITableViewCellEditingStyleInsert) { // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view //nothing to do item already added } } </code></pre> <p>in this method when breakpoint goes at that line</p> <pre><code>[tableView deleteRowsAtIndexPaths: [NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; </code></pre> <p>my application crash what i do for come out from it.</p> <p>-(void)testing:(NSIndexPath *)path{</p> <pre><code>Player *doc = [[Player alloc]init]; NSMutableArray* reversedArray = [[NSMutableArray alloc] initWithArray:[[[[NSArray alloc] initWithArray: _data] reverseObjectEnumerator] allObjects]]; doc = [reversedArray objectAtIndex:path.row]; NSLog(@"%@,%d", doc.name,path.row); [self deleteRow:doc]; </code></pre> <p>}</p> <p>-(void)deleteRow:(Player *)doc{</p> <p>// ReferMeAppDelegate *appDelegate = (ReferMeAppDelegate *) [[UIApplication sharedApplication]delegate]; self.party = [PartyParser loadParty]; if (_party != nil) { for (Player *player in _party.players) { NSLog(@"%@, %@", player.name,player.alert); NSComparisonResult resultName, resultEmail, resultPhone, resultLocation; //NSString *str = [appDelegate.plistDict valueForKey:@"flag"]; //if ([player.email length] != 0 &amp;&amp; player.alert == @"1"){ resultName = [doc.name compare:player.name]; resultEmail = [doc.email compare:player.email]; resultPhone = [doc.phone compare:player.phone]; resultLocation = [doc.location compare:player.location]; if(resultName == 0 &amp;&amp; resultEmail == 0 &amp;&amp; resultPhone == 0 &amp;&amp; resultLocation == 0){ //lblName1.text = @"equal"; Player *playerr = [[Player alloc]init]; playerr = player; [_party.players removeObject:playerr]; //[_party.players removeObjectAtIndex:path.row]; break; } // } //if([player.email length] == 0 &amp;&amp; player.alert == @"2"){ else{ resultName = [doc.name compare:player.name]; resultPhone = [doc.phone compare:player.phone]; if (resultName == 0 &amp;&amp; resultPhone == 0) { Player *playerr = [[Player alloc]init]; playerr = player; [_party.players removeObject:playerr]; break;<br> } } }</p> <pre><code> for (Player *player in _party.players) { NSLog(@"after match case player names"); NSLog(@"%@", player.name); } [PartyParser saveParty:_party]; } </code></pre> <p>}</p> <p>I'm using GData xml in app which support read &amp; write operations.</p>
    singulars
    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.
    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