Changeset 823

Show
Ignore:
Timestamp:
04/11/03 00:23:26 (5 years ago)
Author:
morris
Message:

use formatter in NSTextField

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Nuku/trunk/Controller.m

    r822 r823  
    1 /* $Id: Controller.m,v 1.7 2003/04/04 16:55:44 morris Exp $ */ 
     1/* $Id: Controller.m,v 1.8 2003/04/10 22:23:26 morris Exp $ */ 
    22 
    33/* 
     
    708708 
    709709- (void)updateScore { 
    710         NSString                *scoreString; 
    711710        int                             correct, questions; 
    712711        float                   percent; 
     
    720719                percent         = ((float) correct / (float) questions) * 100; 
    721720 
    722         scoreString             = [NSString stringWithFormat:@"%d/%d", correct, questions]; 
    723         [textScore setStringValue:scoreString]; 
    724          
    725         scoreString             = [NSString stringWithFormat:@"%.1f%%", percent]; 
    726         [textPercent setStringValue:scoreString]; 
     721        [textScore setStringValue:[NSString stringWithFormat:@"%d/%d", correct, questions]]; 
     722        [textPercent setFloatValue:percent]; 
    727723} 
    728724