Changeset 10116


Ignore:
Timestamp:
Feb 6, 2010, 5:12:16 PM (12 years ago)
Author:
livings124
Message:

add some temporary asserts to track down #2805

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/FileNameCell.m

    r9844 r10116  
    120120    }
    121121   
     122    NSIndexSet * indexSet = [(FileListNode *)[self objectValue] indexes];
     123    NSAssert(indexSet != nil, @"indexSet must not be nil - temp");
     124   
    122125    NSColor * titleColor, * statusColor;
    123126    if ([self backgroundStyle] == NSBackgroundStyleDark)
  • trunk/macosx/FileOutlineController.m

    r9844 r10116  
    162162{
    163163    if ([[tableColumn identifier] isEqualToString: @"Check"])
     164    {
     165        NSIndexSet * indexSet = [(FileListNode *)item indexes];
     166        NSAssert(indexSet != nil, @"indexSet must not be nil - temp");
    164167        return [NSNumber numberWithInteger: [fTorrent checkForFiles: [(FileListNode *)item indexes]]];
     168    }
    165169    else
    166170        return item;
     
    172176    NSString * identifier = [tableColumn identifier];
    173177    if ([identifier isEqualToString: @"Check"])
     178    {
     179        NSIndexSet * indexSet = [(FileListNode *)item indexes];
     180        NSAssert(indexSet != nil, @"indexSet must not be nil - temp");
    174181        [cell setEnabled: [fTorrent canChangeDownloadCheckForFiles: [(FileListNode *)item indexes]]];
     182    }
    175183    else if ([identifier isEqualToString: @"Priority"])
    176184    {
     
    368376       
    369377        NSInteger state = ([menuItem tag] == FILE_CHECK_TAG) ? NSOnState : NSOffState;
     378        NSAssert(itemIndexes != nil, @"indexSet must not be nil - temp");
    370379        return [fTorrent checkForFiles: itemIndexes] != state && [fTorrent canChangeDownloadCheckForFiles: itemIndexes];
    371380    }
     
    380389        for (NSInteger i = [indexSet firstIndex]; i != NSNotFound; i = [indexSet indexGreaterThanIndex: i])
    381390            [itemIndexes addIndexes: [[fOutline itemAtRow: i] indexes]];
    382            
     391       
     392        NSAssert(itemIndexes != nil, @"indexSet must not be nil - temp");
    383393        return [fTorrent canChangeDownloadCheckForFiles: itemIndexes];
    384394    }
     
    412422        {
    413423            NSIndexSet * fileIndexSet = [[fOutline itemAtRow: i] indexes];
     424            NSAssert(fileIndexSet != nil, @"indexSet must not be nil - temp");
    414425            if (![fTorrent canChangeDownloadCheckForFiles: fileIndexSet])
    415426                continue;
  • trunk/macosx/FileOutlineView.m

    r9844 r10116  
    185185        NSDictionary * item = [self itemAtRow: row];
    186186        NSIndexSet * indexes = [(FileListNode *)item indexes];
     187        NSAssert(indexes != nil, @"indexSet must not be nil - temp");
    187188       
    188189        if ([fTorrent checkForFiles: indexes] != NSOffState)
Note: See TracChangeset for help on using the changeset viewer.