Changeset 1302

Show
Ignore:
Timestamp:
05/22/04 10:06:59 (5 years ago)
Author:
morris
Message:

arguments should be NSStrings

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WiredClient/trunk/WCConnection.h

    r1298 r1302  
    1 /* $Id: WCConnection.h,v 1.8 2004/05/22 02:18:09 morris Exp $ */ 
     1/* $Id: WCConnection.h,v 1.9 2004/05/22 08:06:59 morris Exp $ */ 
    22 
    33/* 
     
    135135 
    136136- (void)                                                sendCommand:(NSString *)command; 
    137 - (void)                                                sendCommand:(NSString *)command withArgument:(id)argument1; 
    138 - (void)                                                sendCommand:(NSString *)command withArgument:(id)argument1 withArgument:(id)argument2; 
    139 - (void)                                                sendCommand:(NSString *)command withArgument:(id)argument1 withArgument:(id)argument2 withArgument:(id)argument3; 
     137- (void)                                                sendCommand:(NSString *)command withArgument:(NSString *)argument1; 
     138- (void)                                                sendCommand:(NSString *)command withArgument:(NSString *)argument1 withArgument:(NSString *)argument2; 
     139- (void)                                                sendCommand:(NSString *)command withArgument:(NSString *)argument1 withArgument:(NSString *)argument2 withArgument:(NSString *)argument3; 
    140140- (void)                                                receiveData:(NSData *)data; 
    141141         
  • WiredClient/trunk/WCConnection.m

    r1298 r1302  
    1 /* $Id: WCConnection.m,v 1.11 2004/05/22 02:18:09 morris Exp $ */ 
     1/* $Id: WCConnection.m,v 1.12 2004/05/22 08:06:59 morris Exp $ */ 
    22 
    33/* 
     
    458458 
    459459 
    460 - (void)sendCommand:(NSString *)command withArgument:(id)argument1 { 
     460- (void)sendCommand:(NSString *)command withArgument:(NSString *)argument1 { 
    461461        [self sendCommand:command withArgument:argument1 withArgument:NULL withArgument:NULL]; 
    462462} 
     
    464464 
    465465 
    466 - (void)sendCommand:(NSString *)command withArgument:(id)argument1 withArgument:(id)argument2 { 
     466- (void)sendCommand:(NSString *)command withArgument:(NSString *)argument1 withArgument:(NSString *)argument2 { 
    467467        [self sendCommand:command withArgument:argument1 withArgument:argument2 withArgument:NULL]; 
    468468} 
     
    470470 
    471471 
    472 - (void)sendCommand:(NSString *)command withArgument:(id)argument1 withArgument:(id)argument2 withArgument:(id)argument3 { 
    473         NSString        *string
     472- (void)sendCommand:(NSString *)command withArgument:(NSString *)argument1 withArgument:(NSString *)argument2 withArgument:(NSString *)argument3 { 
     473        NSString        *string = command
    474474        NSData          *data; 
    475475         
    476476        // --- add arguments 
    477         if(argument2) { 
     477        if(argument3) { 
    478478                string = [NSString stringWithFormat:@"%@ %@%@%@%@%@", 
    479479                        command, argument1, WCFieldSeparator, argument2, WCFieldSeparator, argument3]; 
    480480        } 
    481         if(argument2) { 
     481        else if(argument2) { 
    482482                string = [NSString stringWithFormat:@"%@ %@%@%@", 
    483483                        command, argument1, WCFieldSeparator, argument2]; 
     
    486486                string = [NSString stringWithFormat:@"%@ %@", 
    487487                        command, argument1]; 
    488         } 
    489         else if(command) { 
    490                 string = command; 
    491488        } 
    492489