project_files/HedgewarsMobile/Classes/FlagsViewController.m
author nemo
Sun, 04 Sep 2011 13:36:59 -0400
changeset 5771 e3a047e84e19
parent 5208 878e551f0b4a
child 6078 8c0cc07731e5
permissions -rw-r--r--
by request of shoppa player, remove land spray from shoppa wep set
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3829
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
     1
/*
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
     2
 * Hedgewars-iOS, a Hedgewars port for iOS devices
4976
088d40d8aba2 Happy 2011 :)
koda
parents: 4478
diff changeset
     3
 * Copyright (c) 2009-2011 Vittorio Giovara <vittorio.giovara@gmail.com>
3829
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
     4
 *
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
     8
 *
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
    12
 * GNU General Public License for more details.
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
    13
 *
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
    14
 * You should have received a copy of the GNU General Public License
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
    15
 * along with this program; if not, write to the Free Software
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
    17
 *
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
    18
 * File created on 08/04/2010.
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
    19
 */
81db3c85784b headers ftw, also right project file
koda
parents: 3697
diff changeset
    20
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    21
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    22
#import "FlagsViewController.h"
4478
05029b4d8490 code cleanup
koda
parents: 3971
diff changeset
    23
#import <QuartzCore/QuartzCore.h>
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    24
#import "CommodityFunctions.h"
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    25
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    26
@implementation FlagsViewController
3950
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    27
@synthesize teamDictionary, flagArray, communityArray, lastIndexPath;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    28
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    29
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    30
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    31
    return rotationManager(interfaceOrientation);
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    32
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    33
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    34
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    35
#pragma mark -
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    36
#pragma mark View lifecycle
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    37
-(void) viewDidLoad {
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    38
    [super viewDidLoad];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    39
3950
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    40
    NSMutableArray *array_na = [[NSMutableArray alloc] init];
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    41
    NSMutableArray *array_cm = [[NSMutableArray alloc] init];
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    42
    
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    43
    for (NSString *name in [[NSFileManager defaultManager] contentsOfDirectoryAtPath:FLAGS_DIRECTORY() error:NULL]) {
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    44
        if ([name hasPrefix:@"cm_"]) {
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    45
            NSString *processed = [name substringFromIndex:3];
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    46
            [array_cm addObject:processed];
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    47
        } else
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    48
             [array_na addObject:name];
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    49
    }
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    50
    
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    51
    self.flagArray = array_na;
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    52
    [array_na release];
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    53
    self.communityArray = array_cm;
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    54
    [array_cm release];
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3662
diff changeset
    55
3662
a44406f4369b polish polish polish polish (also: panning horizontal fix, panning momentum, settings page reworked yet again, memory leaks, crashes, segfaults)
koda
parents: 3547
diff changeset
    56
    self.title = NSLocalizedString(@"Set team flag",@"");
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    57
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    58
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    59
-(void) viewWillAppear:(BOOL)animated {
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    60
    [super viewWillAppear:animated];
3950
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    61
    // reloadData needed because team might change
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    62
    [self.tableView reloadData];
3950
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    63
    //[self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    64
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    65
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    66
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    67
#pragma mark -
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    68
#pragma mark Table view data source
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    69
-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
3950
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    70
    return 2;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    71
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    72
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    73
-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
3950
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    74
    if (section == 0)
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    75
        return [self.flagArray count];
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    76
    else
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    77
        return [self.communityArray count];
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    78
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    79
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    80
// Customize the appearance of table view cells.
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    81
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    82
    static NSString *CellIdentifier = @"Cell";
3950
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    83
    NSInteger row = [indexPath row];
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3662
diff changeset
    84
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    85
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    86
    if (cell == nil) {
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    87
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    88
    }
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3662
diff changeset
    89
3950
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    90
    NSString *flagName = nil;
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    91
    NSArray *source = nil;
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    92
    if ([indexPath section] == 0) {
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    93
        source = self.flagArray;
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    94
        flagName = [source objectAtIndex:row];
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    95
    } else {
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    96
        source = self.communityArray;
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    97
        flagName = [NSString stringWithFormat:@"cm_%@",[source objectAtIndex:row]];
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    98
    }
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
    99
    NSString *flagFile = [[NSString alloc] initWithFormat:@"%@/%@", FLAGS_DIRECTORY(), flagName];
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   100
    UIImage *flagSprite = [[UIImage alloc] initWithContentsOfFile:flagFile];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   101
    [flagFile release];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   102
    cell.imageView.image = flagSprite;
4478
05029b4d8490 code cleanup
koda
parents: 3971
diff changeset
   103
    cell.imageView.layer.borderWidth = 0.3;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   104
    [flagSprite release];
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3662
diff changeset
   105
3950
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   106
    cell.textLabel.text = [[source objectAtIndex:row] stringByDeletingPathExtension];
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   107
    if ([[flagName stringByDeletingPathExtension] isEqualToString:[self.teamDictionary objectForKey:@"flag"]]) {
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   108
        cell.accessoryType = UITableViewCellAccessoryCheckmark;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   109
        self.lastIndexPath = indexPath;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   110
    } else {
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   111
        cell.accessoryType = UITableViewCellAccessoryNone;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   112
    }
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3662
diff changeset
   113
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   114
    return cell;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   115
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   116
3950
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   117
-(NSString *)tableView:(UITableView *)aTableView titleForHeaderInSection:(NSInteger)section {
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   118
    NSString *sectionTitle = nil;
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   119
    switch (section) {
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   120
        case 0:
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   121
            sectionTitle = NSLocalizedString(@"Worldwide", @"");
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   122
            break;
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   123
        case 1:
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   124
            sectionTitle = NSLocalizedString(@"Community", @"");
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   125
            break;
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   126
        default:
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   127
            DLog(@"nope");
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   128
            break;
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   129
    }
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   130
    return sectionTitle;
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   131
}
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   132
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   133
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   134
#pragma mark -
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   135
#pragma mark Table view delegate
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   136
-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   137
    int newRow = [indexPath row];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   138
    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
3950
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   139
    int newSection = [indexPath section];
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   140
    int oldSection = (lastIndexPath != nil) ? [lastIndexPath section] : -1;
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   141
    
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   142
    if (newRow != oldRow || newSection != oldSection) {
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   143
        NSString *flag = nil;
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   144
        if ([indexPath section] == 0)
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   145
            flag = [self.flagArray objectAtIndex:newRow];
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   146
        else
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   147
            flag = [NSString stringWithFormat:@"cm_%@",[self.communityArray objectAtIndex:newRow]];
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   148
        
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   149
        // if the two selected rows differ update data on the hog dictionary and reload table content
3950
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   150
        [self.teamDictionary setValue:[flag stringByDeletingPathExtension] forKey:@"flag"];
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   151
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   152
        // tell our boss to write this new stuff on disk
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   153
        [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   154
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   155
        UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   156
        newCell.accessoryType = UITableViewCellAccessoryCheckmark;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   157
        UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   158
        oldCell.accessoryType = UITableViewCellAccessoryNone;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   159
        self.lastIndexPath = indexPath;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   160
        [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   161
    }
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   162
    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   163
    [self.navigationController popViewControllerAnimated:YES];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   164
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   165
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   166
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   167
#pragma mark -
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   168
#pragma mark Memory management
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   169
-(void) didReceiveMemoryWarning {
3950
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   170
    self.lastIndexPath = nil;
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   171
    MSG_MEMCLEAN();
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   172
    [super didReceiveMemoryWarning];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   173
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   174
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   175
-(void) viewDidUnload {
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   176
    self.teamDictionary = nil;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   177
    self.lastIndexPath = nil;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   178
    self.flagArray = nil;
3950
296cbdd85e50 split the flag tableview in worldwide and community
koda
parents: 3829
diff changeset
   179
    self.communityArray = nil;
3662
a44406f4369b polish polish polish polish (also: panning horizontal fix, panning momentum, settings page reworked yet again, memory leaks, crashes, segfaults)
koda
parents: 3547
diff changeset
   180
    MSG_DIDUNLOAD();
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   181
    [super viewDidUnload];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   182
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   183
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   184
-(void) dealloc {
5208
878e551f0b4a all together now! releaseAndNil ftw
koda
parents: 4976
diff changeset
   185
    releaseAndNil(teamDictionary);
878e551f0b4a all together now! releaseAndNil ftw
koda
parents: 4976
diff changeset
   186
    releaseAndNil(lastIndexPath);
878e551f0b4a all together now! releaseAndNil ftw
koda
parents: 4976
diff changeset
   187
    releaseAndNil(flagArray);
878e551f0b4a all together now! releaseAndNil ftw
koda
parents: 4976
diff changeset
   188
    releaseAndNil(communityArray);
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   189
    [super dealloc];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   190
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   191
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   192
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   193
@end
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   194