//
//  TestApp1AppDelegate.m
//  TestApp1
//
//  Created by itexmac2 on 05/05/11.
//  Copyright 2011 Laurens'Tribune. All rights reserved.
//

#import "TestApp1AppDelegate.h"
#import "TeXDistArchitecture.h"
#import "TeXDistributionBridge.h"

@interface TestApp1AppDelegate()
@property (readwrite,retain) NSArray * distributions;
@end

@implementation TestApp1AppDelegate

@synthesize window;
@synthesize distributions;

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
    // Insert code here to initialize your application
    NSMutableArray *MRA = [NSMutableArray array];
    TeXDistributionBridge * TDB = nil;
    NSMutableArray *mra = nil;
    [MRA addObject:(TDB = [[[TeXDistributionBridge alloc] initWithContentsOfURL:[NSURL fileURLWithPath:@"One"] andReturnError:NULL]autorelease])];
    mra = [NSMutableArray array];
    [mra addObject:[[[TeXDistArchitecture alloc] initWithName:@"1" destinationPath:nil]autorelease]];
    TDB.architectures = mra;
    [MRA addObject:(TDB = [[[TeXDistributionBridge alloc] initWithContentsOfURL:[NSURL fileURLWithPath:@"Two"] andReturnError:NULL]autorelease])];
    mra = [NSMutableArray array];
    [mra addObject:[[[TeXDistArchitecture alloc] initWithName:@"2" destinationPath:nil]autorelease]];
    [mra addObject:[[[TeXDistArchitecture alloc] initWithName:@"3" destinationPath:nil]autorelease]];
    TDB.architectures = mra;
    [MRA addObject:(TDB = [[[TeXDistributionBridge alloc] initWithContentsOfURL:[NSURL fileURLWithPath:@"Three"] andReturnError:NULL]autorelease])];
    mra = [NSMutableArray array];
    [mra addObject:[[[TeXDistArchitecture alloc] initWithName:@"4" destinationPath:nil]autorelease]];
    [mra addObject:[[[TeXDistArchitecture alloc] initWithName:@"5" destinationPath:nil]autorelease]];
    [mra addObject:[[[TeXDistArchitecture alloc] initWithName:@"6" destinationPath:nil]autorelease]];
    TDB.architectures = mra;
    self.distributions = MRA;
}

@end
