This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (void) doIt { | |
| // Define the command name and the arguments array (the nil at the end is needed) | |
| NSArray *arguments = [NSArray arrayWithObjects:@"--some-argument", @"--another", nil]; | |
| NSString *command = @"do-something-shell"; | |
| // Setup the NSTask for the command execution | |
| NSTask *task = [[NSTask alloc] init]; | |
| task.launchPath = command; | |
| task.arguments = arguments; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <Foundation/NSObject.h> | |
| @interface Fraction: NSObject { | |
| int numerator; | |
| int denominator; | |
| } | |
| -(void) print; | |
| -(void) setNumerator: (int) n; | |
| -(void) setDenominator: (int) d; |
NewerOlder