<?xml version="1.0"?>
<paste-with-annotations>
  <paste>
    <number>
      <integer>82958</integer>
    </number>
    <user>
      <string>markusca</string>
    </user>
    <title>
      <string>treecontroller</string>
    </title>
    <contents>
      <string>- (id) init
{
	self = [super init];
	if (self != nil) {
		self.testcases = [[NSMutableArray alloc] init];
		
		MysqlObject *db = [[MysqlObject alloc] init];
		NSArray *mysqlArray = [NSArray arrayWithArray:[db queryTestcases:self]];
		
		for (id eachTestcase in mysqlArray) {
			NSString *title = [eachTestcase valueForKey:@&quot;area&quot;];
			bool isadded = NO;
			for (id testcaseArray in self.testcases) {
				if ([[testcaseArray valueForKey:@&quot;title&quot;] isEqual:title]) {
					[[testcaseArray valueForKey:@&quot;items&quot;] addObject:eachTestcase];
					isadded = YES;
					break;
				}
			}
			if (!isadded) {
				NSArray *values = [NSArray arrayWithObjects:[eachTestcase valueForKey:@&quot;area&quot;], [NSMutableArray arrayWithObject:eachTestcase], nil];
				NSArray *keys = [NSArray arrayWithObjects:@&quot;title&quot;, @&quot;items&quot;, nil];
				NSDictionary *item = [NSDictionary dictionaryWithObjects:values forKeys:keys];
				[self.testcases addObject:item];
			}
			[title release];
		}
	}
	return self;
}
</string>
    </contents>
    <universal-time>
      <integer>3455624347</integer>
    </universal-time>
    <channel>
      <string>#macdev</string>
    </channel>
    <colorization-mode>
      <string>Objective C</string>
    </colorization-mode>
    <maybe-spam>
      <null/>
    </maybe-spam>
    <is-unicode>
      <keyword>TRUE</keyword>
    </is-unicode>
    <deletion-requested>
      <null/>
    </deletion-requested>
    <deletion-requested-email>
      <null/>
    </deletion-requested-email>
    <expiration-time>
      <null/>
    </expiration-time>
  </paste>
</paste-with-annotations>
