Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (32 sloc) 1.1 kb
//
// MultiAddWindowController.m
// MilkMaid
//
// Created by Gregamel on 2/16/10.
// Copyright 2010 JGA. All rights reserved.
//
#import "MultiAddWindowController.h"
@implementation MultiAddWindowController
@synthesize tasks;
@synthesize globalAttributes;
-(void)addClicked:(id)sender {
NSTextView *textView = [scrollTextView documentView];
NSString *tasksString = [[textView textStorage] string];
tasksString = [tasksString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
tasks = [tasksString componentsSeparatedByString:@"\n"];
globalAttributes = [globalTextField stringValue];
[tasks retain];
[globalAttributes retain];
[textView setString:@""];
[globalTextField setStringValue:@""];
[self.window makeFirstResponder:scrollTextView];
[NSApp endSheet:[self window] returnCode:1];
}
-(void)cancelClicked:(id)sender {
NSTextView *textView = [scrollTextView documentView];
[textView setString:@""];
[globalTextField setStringValue:@""];
[self.window makeFirstResponder:scrollTextView];
[NSApp endSheet:[self window] returnCode:0];
}
@end
Jump to Line
Something went wrong with that request. Please try again.