Changeset 14050


Ignore:
Timestamp:
Mar 12, 2013, 2:56:35 AM (9 years ago)
Author:
livings124
Message:

the PiecesView? will use target/action instead of notification center for mouse-down events

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoActivityViewController.m

    r13601 r14050  
    5656- (void) awakeFromNib
    5757{
    58     [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(updatePiecesView) name: @"UpdatePiecesView" object: nil];
    59    
    6058    [fTransferSectionLabel sizeToFit];
    6159    [fDatesSectionLabel sizeToFit];
     
    9694        [field setFrame: frame];
    9795    }
     96   
     97    //set the click action of the pieces view
     98    [fPiecesView setAction:@selector(updatePiecesView)];
     99    [fPiecesView setTarget:self];
    98100}
    99101
  • trunk/macosx/PiecesView.m

    r13251 r14050  
    217217        [[NSUserDefaults standardUserDefaults] setBool: availability forKey: @"PiecesViewShowAvailability"];
    218218       
    219         [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdatePiecesView" object: self];
     219        [self sendAction:[self action] to:[self target]];
    220220    }
    221221   
Note: See TracChangeset for help on using the changeset viewer.