Developer Area

Changeset 652

Show
Ignore:
Timestamp:
01/15/10 11:41:22 (5 years ago)
Author:
henri
Message:

Reverted to unsigned int for account inded

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • apps/iphone/my.tel/trunk/Classes/RootViewController.m

    r651 r652  
    2222- (id)initWithStyle:(UITableViewStyle)style { 
    2323    if (self = [super initWithStyle:style]) { 
    24                 self.currentAccountIndex = NSIntegerMax; 
     24                self.currentAccountIndex = NSUIntegerMax; 
    2525                [self loadData]; 
    2626    } 
     
    125125} 
    126126 
    127 - (NSInteger)currentAccountIndex { 
     127- (NSUInteger)currentAccountIndex { 
    128128        return _currentAccountIndex; 
    129129} 
    130130 
    131 - (void)setCurrentAccountIndex:(NSInteger)index { 
    132         if ((index == NSIntegerMax) || (index != self.currentAccountIndex)) { 
     131- (void)setCurrentAccountIndex:(NSUInteger)index { 
     132        if ((index == NSUIntegerMax) || (index != self.currentAccountIndex)) { 
    133133                mustLogin = YES; 
    134134        } 
     
    137137 
    138138- (void)loginToCurrentAccount { 
    139         if (self.currentAccountIndex == NSIntegerMax) { 
     139        if (self.currentAccountIndex == NSUIntegerMax) { 
    140140                // this happens when no account has been flagged as the current account 
    141141                // for example upon startup of the app without any account setup 
     
    146146} 
    147147 
    148 - (void)loginToAccountAtIndex:(NSInteger)accountIndex forced:(BOOL)forced{ 
    149         if (accountIndex == NSIntegerMax) 
     148- (void)loginToAccountAtIndex:(NSUInteger)accountIndex forced:(BOOL)forced{ 
     149        if (accountIndex == NSUIntegerMax) 
    150150                return; 
    151151        if ((accountIndex < 0) || (accountIndex >= [self.accountsArray count])) { 
    152152                // bad index 
    153                 self.currentAccountIndex = NSIntegerMax; 
     153                self.currentAccountIndex = NSUIntegerMax; 
    154154                return; 
    155155        } 
     
    184184                // Failed. Get back to the root 
    185185                NSDictionary *failedAccount = self.currentAccount; 
    186                 self.currentAccountIndex = NSIntegerMax; 
     186                self.currentAccountIndex = NSUIntegerMax; 
    187187                [self.navigationController popToRootViewControllerAnimated:NO]; 
    188188                UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:[failedAccount objectForKey:@"accountLabel"] 
     
    196196} 
    197197 
    198 - (void)displayControllerForAccountAtIndex:(NSInteger)accountIndex { 
     198- (void)displayControllerForAccountAtIndex:(NSUInteger)accountIndex { 
    199199        NSString *accountLabel = [[self.accountsArray objectAtIndex:accountIndex] objectForKey:@"accountLabel"]; 
    200200        AccountViewController *aVC = [AccountViewController controllerForAccountLabel:accountLabel]; 
     
    203203} 
    204204 
    205 - (void)editAccountAtIndex:(NSInteger)accountIndex { 
     205- (void)editAccountAtIndex:(NSUInteger)accountIndex { 
    206206        if (accountIndex >= [self.accountsArray count]) { 
    207207                // invalid current account index 
     
    223223        NSArray *indexPaths = [NSArray arrayWithObject:[NSIndexPath indexPathForRow:self.currentAccountIndex inSection:kKRootTableViewSectionAccounts]]; 
    224224        [self.tableView deleteRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationFade]; 
    225         self.currentAccountIndex = NSIntegerMax; 
     225        self.currentAccountIndex = NSUIntegerMax; 
    226226        [self saveData]; 
    227227} 
     
    307307                        break; 
    308308                case kKRootTableViewSectionAddAccount: 
    309                         self.currentAccountIndex = NSIntegerMax; 
     309                        self.currentAccountIndex = NSUIntegerMax; 
    310310                        eVC = [[AccountEditController new] autorelease]; 
    311311                        eVC.delegate = self; 
     
    371371        [self.accountsArray exchangeObjectAtIndex:fromIndexPath.row withObjectAtIndex:toIndexPath.row]; 
    372372        // Reset the current account 
    373         self.currentAccountIndex = NSIntegerMax; 
     373        self.currentAccountIndex = NSUIntegerMax; 
    374374        [self saveData]; 
    375375} 
     
    398398                if (self.currentAccountIndex == thePath.row) { 
    399399                        // deleting current account 
    400                         self.currentAccountIndex = NSIntegerMax; 
     400                        self.currentAccountIndex = NSUIntegerMax; 
    401401                } else if (self.currentAccountIndex > thePath.row) { 
    402402                        // sync current account index 
Telnic
Search This Site
Partners
Neustar
ICANN
Main site | WHOIS | Sell .tel | FAQ | Archived Site | About Telnic | Contact Us