
#import "Controller.h"
#include <stdio.h>
#include <string.h>

@implementation Controller

- init;
{
	char *path = (char *)malloc(50);
	int i;

	[super init];
	outpath = malloc(500);
	strcpy(path, "I like apples!\nI like appricots!\nI like bananas!\n");
	outpath[0] = '\0';
	for (i = 0; i < 10; i++) {
		strcat(outpath, path);
	}
	free(path);
	return self;
}

- free;
{
	free(outpath);
	return [super free];
}

- transferText:sender
{
	[theText replaceSel:[theTextField stringValue]];
    return self;
}

- insertLongText:sender
{
	[theText setText:outpath];
	return self;
}

- selectText:sender
{
	[theText textLength];
	[theText setSel:[startField intValue] :[endField intValue]];
	return self;
}

@end
