diff --git a/Classes/ContextDetailController.h b/Classes/ContextDetailController.h deleted file mode 100644 index 35db538..0000000 --- a/Classes/ContextDetailController.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * ContextDetailController.h - * Less2Do - * - * Created by Philip Messlehner on 27.11.09. - * Copyright 2009 __MyCompanyName__. All rights reserved. - * - */ - -#import - -#define NAME_ROW_INDEX 0 -#define NUMBER_OF_EDITABLE_ROWS 1 - -#define LABEL_TAG 4096 - -@interface ContextDetailController : UITableViewController { - Context *context; - NSArray *fieldLabels; - NSMutableDictionary *tempValues; - UITextField *textFieldBeingEdited; -} - -@property (nonatomic, retain) Context *context; -@property (nonatomic, retain) NSArray *fieldLabels; -@property (nonatomic, retain) NSMutableDictionary *tempValues; -@property (nonatomic, retain) UITextField *textFieldBeingEdited; - -- (id)initWithStyle:(UITableViewStyle)aStyle andContext:(Context *)aContext; - -- (IBAction)cancel:(id)sender; -- (IBAction)save:(id)sender; -- (IBAction)textFieldDone:(id)sender; -@end \ No newline at end of file diff --git a/Classes/ContextDetailController.m b/Classes/ContextDetailController.m deleted file mode 100644 index 6a62ff4..0000000 --- a/Classes/ContextDetailController.m +++ /dev/null @@ -1,245 +0,0 @@ -// -// ContextDetailController.m -// Less2Do -// -// Created by Philip Messlehner on 26.11.09. -// Copyright 2009 __MyCompanyName__. All rights reserved. -// - -#import "ContextDetailController.h" -#import "ContextsFirstLevelViewController.h" -#import "TasksListViewController.h" -#import "ContextDAO.h" -#import "Context.h" - -@implementation ContextDetailController - -@synthesize context; -@synthesize fieldLabels; -@synthesize tempValues; -@synthesize textFieldBeingEdited; - -- (id) initWithStyle:(UITableViewStyle)aStyle andContext:(Context *)aContext { - if(![super initWithStyle:aStyle]) - return nil; - - self.context = aContext; - return self; -} - -// Pressing Cancel will pop the actuel View away -- (IBAction) cancel:(id)sender { - [self.navigationController popViewControllerAnimated:YES]; -} - -- (IBAction) save:(id)sender { - // Save was touched while Editing a Textfield -> store the Input in tempValues - if(textFieldBeingEdited != nil) { - NSNumber *tagAsNum = [[NSNumber alloc] initWithInt:textFieldBeingEdited.tag]; - [tempValues setObject:textFieldBeingEdited.text forKey:tagAsNum]; - [tagAsNum release]; - } - - // Update - if (context != nil) { - NSNumber *key = [[NSNumber alloc] initWithInt:NAME_ROW_INDEX]; - if ([[tempValues allKeys] containsObject:key]) { - if([[tempValues objectForKey:key] length]==0) { - [key release]; - ALog ("Invalid Input"); - return; - } - context.name = [tempValues objectForKey:key]; - } - [key release]; - - NSError *error; - DLog ("Try to update Context '%@'", context.name); - if(![ContextDAO updateContext:context error:&error]) { - ALog ("Error occured while updating Context"); - } - else { - ALog ("Context updated"); - } - - NSArray *allControllers = self.navigationController.viewControllers; - - if ([allControllers count]>=1) { - //Magic - UIViewController *oneController = [allControllers objectAtIndex:[allControllers count]-1]; - - if([oneController isKindOfClass:[ContextsFirstLevelViewController class]]) { - ContextsFirstLevelViewController *parent = (ContextsFirstLevelViewController *) oneController; - [parent.tableView reloadData]; - } - } - - //[self.navigationController popViewControllerAnimated:YES]; - } - // Insert - else { - // Only Saves when text was entered - NSNumber *key = [[NSNumber alloc] initWithInt:NAME_ROW_INDEX]; - NSString *contextName = [tempValues objectForKey:key]; - [key release]; - - if(contextName == nil || [contextName length] == 0) - return; - - NSError *error; - context = [ContextDAO addContextWithName:contextName error:&error]; - ALog ("Context inserted"); - NSArray *allControllers = self.navigationController.viewControllers; - - if ([allControllers count]>1) { - //Magic - UIViewController *oneController = [allControllers objectAtIndex:[allControllers count]-2]; - - if([oneController isKindOfClass:[ContextsFirstLevelViewController class]]) { - ContextsFirstLevelViewController *parent = (ContextsFirstLevelViewController *) oneController; - TasksListViewController *contextView = [[TasksListViewController alloc] initWithStyle:UITableViewStylePlain]; - contextView.title = context.name; - contextView.image = [UIImage imageNamed:@"all_tasks.png"]; - [parent.controllersSection1 addObject:contextView]; - [parent.list addObject:context]; - [contextView release]; - } - } - //[self dismissModalViewControllerAnimated:YES]; - } - - [self.navigationController popViewControllerAnimated:YES]; -} - - -// Hides the Keyboard after Touching "Done" -- (IBAction) textFieldDone:(id)sender { - [sender resignFirstResponder]; -} - -#pragma mark - -- (void) viewDidLoad { - ALog ("ContextDetailView started didLoad"); - NSArray *array = [[NSArray alloc] initWithObjects:@"Name:", nil]; - self.fieldLabels = array; - [array release]; - - UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithTitle:@"Cancel" - style:UIBarButtonItemStyleBordered - target:self - action:@selector(cancel:)]; - self.navigationItem.leftBarButtonItem = cancelButton; - [cancelButton release]; - - UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithTitle:@"Save" - style:UIBarButtonItemStyleDone - target:self - action:@selector(save:)]; - self.navigationItem.rightBarButtonItem = saveButton; - [saveButton release]; - - NSMutableDictionary *dict = [[NSMutableDictionary alloc] init]; - self.tempValues = dict; - [dict release]; - - UIView *textField = [self.tableView viewWithTag:NAME_ROW_INDEX]; - if(textField != nil) { - ALog ("Textfield found"); - [textField resignFirstResponder]; - } - - [super viewDidLoad]; -} - -- (void) dealloc { - [textFieldBeingEdited release]; - [tempValues release]; - [context release]; - [fieldLabels release]; - - [super dealloc]; -} - -#pragma mark - -#pragma mark Table Data Source Methods -- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return NUMBER_OF_EDITABLE_ROWS; -} - -- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - static NSString *cellID = @"ContextsEditCellID"; - - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID]; - NSUInteger row = [indexPath row]; - - if (cell == nil) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID] autorelease]; - - UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10,10,75,25)]; - label.textAlignment = UITextAlignmentRight; - label.tag = LABEL_TAG; - label.font = [UIFont boldSystemFontOfSize:14]; - [cell.contentView addSubview:label]; - [label release]; - - UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(90, 12, 200, 25)]; - textField.clearsOnBeginEditing = NO; - textField.tag = row; - [textField setDelegate:self]; - textField.returnKeyType = UIReturnKeyDone; - textField.autocorrectionType = UITextAutocorrectionTypeNo; - [textField addTarget:self action:@selector(textFieldDone:) forControlEvents:UIControlEventEditingDidEndOnExit]; - [cell.contentView addSubview:textField]; - - } - - UILabel *label = (UILabel *)[cell viewWithTag:LABEL_TAG]; - UITextField *textField = nil; - for (UIView *oneView in cell.contentView.subviews) { - if([oneView isMemberOfClass:[UITextField class]]) - textField = (UITextField *)oneView; - } - - label.text = [fieldLabels objectAtIndex:row]; - NSNumber *rowAsNum = [[NSNumber alloc] initWithInt:row]; - - switch (row) { - case NAME_ROW_INDEX: - if([[tempValues allKeys] containsObject:rowAsNum]) - textField.text = [tempValues objectForKey:rowAsNum]; - else if (context != nil) - textField.text = context.name; - textField.placeholder = @"Enter Context-Name"; - break; - default: - break; - } - - if(textFieldBeingEdited == textField) - textFieldBeingEdited = nil; - - textField.tag = row; - [rowAsNum release]; - - return cell; -} - -#pragma mark - -#pragma mark Table Delegate Methods - -- (NSIndexPath *) tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath { - return nil; -} - -#pragma mark Text Field Delegate Methods -- (void) textFieldDidBeginEditing:(UITextField *)textField { - self.textFieldBeingEdited = textField; -} - -- (void) textFieldDidEndEditing:(UITextField *)textField { - NSNumber *tagAsNum = [[NSNumber alloc] initWithInt:textField.tag]; - [tempValues setObject:textField.text forKey:tagAsNum]; - [tagAsNum release]; -} - -@end diff --git a/Classes/ContextsFirstLevelViewController.m b/Classes/ContextsFirstLevelViewController.m index 3442ab0..17c988b 100644 --- a/Classes/ContextsFirstLevelViewController.m +++ b/Classes/ContextsFirstLevelViewController.m @@ -8,7 +8,7 @@ #import "ContextsFirstLevelViewController.h" #import "TasksListViewController.h" -#import "ContextDetailController.h" +#import "ContextDetailViewController.h" @implementation ContextsFirstLevelViewController @@ -33,17 +33,12 @@ -(IBAction)toggleEdit:(id)sender { } - (IBAction)toggleAdd:(id)sender { - /*ContextDetailController *contextDetail = [[ContextDetailController alloc] initWithStyle:UITableViewStyleGrouped]; + ContextDetailViewController *contextDetail = [[ContextDetailViewController alloc] initWithStyle:UITableViewStyleGrouped andParent:self]; contextDetail.title = @"Add Context"; UINavigationController* nc = [[UINavigationController alloc] initWithRootViewController:contextDetail]; [contextDetail release]; [self presentModalViewController:nc animated:YES]; - [nc release];*/ - - ContextDetailController *contextDetail = [[ContextDetailController alloc] initWithStyle:UITableViewStyleGrouped]; - contextDetail.title = @"Add Context"; - [self.navigationController pushViewController:contextDetail animated:YES]; - [contextDetail release]; + [nc release]; } -(void)viewDidLoad { @@ -214,7 +209,7 @@ - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexP [self.navigationItem.leftBarButtonItem setTitle:@"Edit"]; [self.navigationItem.leftBarButtonItem setStyle:UIBarButtonItemStyleBordered]; - ContextDetailController *contextDetail = [[ContextDetailController alloc] initWithStyle:UITableViewStyleGrouped andContext:context]; + ContextDetailViewController *contextDetail = [[ContextDetailViewController alloc] initWithStyle:UITableViewStyleGrouped andParent:self andContext:context]; contextDetail.title = context.name; [self.navigationController pushViewController:contextDetail animated:YES]; [contextDetail release]; diff --git a/Classes/FolderDetailController.h b/Classes/FolderDetailController.h deleted file mode 100644 index 77a0c4c..0000000 --- a/Classes/FolderDetailController.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// FolderDetailController.h -// Less2Do -// -// Created by Philip Messlehner on 30.11.09. -// Copyright 2009 __MyCompanyName__. All rights reserved. -// - -#import - -#define NAME_ROW_INDEX 0 -#define COLOR_ROW_INDEX 1 -#define NUMBER_OF_EDITABLE_ROWS 1 - -#define LABEL_TAG 4096 - -@interface FolderDetailController : UITableViewController { - Folder *folder; - NSArray *fieldLabels; - NSMutableDictionary *tempValues; - UITextField *textFieldBeingEdited; -} - -@property (nonatomic, retain) Folder *folder; -@property (nonatomic, retain) NSArray *fieldLabels; -@property (nonatomic, retain) NSMutableDictionary *tempValues; -@property (nonatomic, retain) UITextField *textFieldBeingEdited; - -- (id)initWithStyle:(UITableViewStyle)aStyle andFolder:(Folder *)aFolder; -- (UITableViewCell *)createNameCell; - -- (IBAction)cancel:(id)sender; -- (IBAction)save:(id)sender; -- (IBAction)textFieldDone:(id)sender; -@end \ No newline at end of file diff --git a/Classes/FolderDetailController.m b/Classes/FolderDetailController.m deleted file mode 100644 index e8b6a2f..0000000 --- a/Classes/FolderDetailController.m +++ /dev/null @@ -1,252 +0,0 @@ -// -// FolderDetailController.m -// Less2Do -// -// Created by Philip Messlehner on 30.11.09. -// Copyright 2009 __MyCompanyName__. All rights reserved. -// - -#import "FolderDetailController.h" -#import "FolderFirstLevelController.h" -#import "TasksListViewController.h" -#import "FolderDAO.h" -#import "Folder.h" - -@implementation FolderDetailController - -@synthesize folder; -@synthesize fieldLabels; -@synthesize tempValues; -@synthesize textFieldBeingEdited; - -- (id) initWithStyle:(UITableViewStyle)aStyle andFolder:(Folder *)aFolder { - if(![super initWithStyle:aStyle]) - return nil; - - self.folder = aFolder; - return self; -} - -// Pressing Cancel will pop the actuel View away -- (IBAction) cancel:(id)sender { - [self.navigationController popViewControllerAnimated:YES]; -} - -- (IBAction) save:(id)sender { - - // Save was touched while Editing a Textfield -> store the Input in tempValues - if(textFieldBeingEdited != nil) { - NSNumber *tagAsNum = [[NSNumber alloc] initWithInt:textFieldBeingEdited.tag]; - [tempValues setObject:textFieldBeingEdited.text forKey:tagAsNum]; - [tagAsNum release]; - } - - - - // Update - if (folder != nil) { - NSNumber *key = [[NSNumber alloc] initWithInt:NAME_ROW_INDEX]; - if ([[tempValues allKeys] containsObject:key]) { - if([[tempValues objectForKey:key] length]==0) { - [key release]; - ALog ("Invalid Input"); - return; - } - folder.name = [tempValues objectForKey:key]; - } - [key release]; - - NSError *error; - DLog ("Try to update Folder '%@'", folder.name); - if(![FolderDAO updateFolder:folder error:&error]) { - ALog ("Error occured while updating Folder"); - } - else { - ALog ("Folder updated"); - } - } - // Insert - else { - // Only Saves when text was entered - NSNumber *key = [[NSNumber alloc] initWithInt:NAME_ROW_INDEX]; - NSString *folderName = [tempValues objectForKey:key]; - [key release]; - - if (folderName == nil || [folderName length] == 0) - return; - - NSError *error; - folder = [FolderDAO addFolderWithName:folderName error:&error]; - ALog ("Folder inserted"); - NSArray *allControllers = self.navigationController.viewControllers; - - if ([allControllers count]>1) { - UIViewController *oneController = [allControllers objectAtIndex:[allControllers count]-2]; - - if([oneController isKindOfClass:[FolderFirstLevelController class]]) { - FolderFirstLevelController *parent = (FolderFirstLevelController *) oneController; - TasksListViewController *folderView = [[TasksListViewController alloc] initWithStyle:UITableViewStylePlain]; - folderView.title = folder.name; - folderView.image = [UIImage imageNamed:@"all_tasks.png"]; - [parent.controllersSection1 addObject:folderView]; - [parent.list addObject:folder]; - [folderView release]; - } - } - } - - [self.navigationController popViewControllerAnimated:YES]; -} - - -// Hides the Keyboard after Touching "Done" -- (IBAction) textFieldDone:(id)sender { - [sender resignFirstResponder]; -} - -#pragma mark - -- (void) viewDidLoad { - NSArray *array = [[NSArray alloc] initWithObjects:@"Name:", nil]; - self.fieldLabels = array; - [array release]; - - UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithTitle:@"Cancel" - style:UIBarButtonItemStyleBordered - target:self - action:@selector(cancel:)]; - self.navigationItem.leftBarButtonItem = cancelButton; - [cancelButton release]; - - UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithTitle:@"Save" - style:UIBarButtonItemStyleDone - target:self - action:@selector(save:)]; - self.navigationItem.rightBarButtonItem = saveButton; - [saveButton release]; - - NSMutableDictionary *dict = [[NSMutableDictionary alloc] init]; - self.tempValues = dict; - [dict release]; - [super viewDidLoad]; -} - -- (void) dealloc { - [textFieldBeingEdited release]; - [tempValues release]; - [folder release]; - [fieldLabels release]; - - [super dealloc]; -} - -#pragma mark - -#pragma mark Table Data Source Methods -- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return NUMBER_OF_EDITABLE_ROWS; -} - -- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - NSUInteger row = [indexPath row]; - UITableViewCell *cell; - - // Name Row - if (row == NAME_ROW_INDEX) { - cell = [tableView dequeueReusableCellWithIdentifier:@"FoldersTextCellID"]; - - if (cell == nil) { - cell = [self createNameCell]; - } - - UILabel *label = (UILabel *)[cell viewWithTag:LABEL_TAG]; - UITextField *textField = nil; - for (UIView *oneView in cell.contentView.subviews) { - if([oneView isMemberOfClass:[UITextField class]]) - textField = (UITextField *)oneView; - } - - label.text = [fieldLabels objectAtIndex:row]; - NSNumber *rowAsNum = [[NSNumber alloc] initWithInt:row]; - - switch (row) { - case NAME_ROW_INDEX: - if([[tempValues allKeys] containsObject:rowAsNum]) - textField.text = [tempValues objectForKey:rowAsNum]; - else if (folder != nil) - textField.text = folder.name; - textField.placeholder = @"Enter Folder-Name"; - break; - default: - break; - } - - if(textFieldBeingEdited == textField) - textFieldBeingEdited = nil; - - textField.tag = row; - [rowAsNum release]; - } - - if (row == COLOR_ROW_INDEX) { - cell = [tableView dequeueReusableCellWithIdentifier:@"FoldersColorCellID"]; - - if (cell == nil) { - cell = [self createNameCell]; - } - - UILabel *label = (UILabel *)[cell viewWithTag:LABEL_TAG]; - UITextField *textField = nil; - for (UIView *oneView in cell.contentView.subviews) { - if([oneView isMemberOfClass:[UITextField class]]) - textField = (UITextField *)oneView; - } - - label.text = [fieldLabels objectAtIndex:row]; - NSNumber *rowAsNum = [[NSNumber alloc] initWithInt:row]; - - - - [rowAsNum release]; - } - - return cell; -} - -- (UITableViewCell *)createNameCell { - UITableViewCell *cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"FolderStandardCellID"] autorelease]; - - UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10,10,75,25)]; - label.textAlignment = UITextAlignmentRight; - label.tag = LABEL_TAG; - label.font = [UIFont boldSystemFontOfSize:14]; - [cell.contentView addSubview:label]; - [label release]; - - UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(90, 12, 200, 25)]; - textField.clearsOnBeginEditing = NO; - [textField setDelegate:self]; - textField.returnKeyType = UIReturnKeyDone; - textField.autocorrectionType = UITextAutocorrectionTypeNo; - [textField addTarget:self action:@selector(textFieldDone:) forControlEvents:UIControlEventEditingDidEndOnExit]; - [cell.contentView addSubview:textField]; - return cell; -} - -#pragma mark - -#pragma mark Table Delegate Methods - -- (NSIndexPath *) tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath { - return nil; -} - -#pragma mark Text Field Delegate Methods -- (void) textFieldDidBeginEditing:(UITextField *)textField { - self.textFieldBeingEdited = textField; -} - -- (void) textFieldDidEndEditing:(UITextField *)textField { - NSNumber *tagAsNum = [[NSNumber alloc] initWithInt:textField.tag]; - [tempValues setObject:textField.text forKey:tagAsNum]; - [tagAsNum release]; -} - -@end \ No newline at end of file diff --git a/Classes/FolderFirstLevelController.m b/Classes/FolderFirstLevelController.m index 8aec36c..5ad2e20 100644 --- a/Classes/FolderFirstLevelController.m +++ b/Classes/FolderFirstLevelController.m @@ -9,7 +9,7 @@ #import "FolderFirstLevelController.h" #import "TasksListViewController.h" #import "FolderDAO.h" -#import "FolderDetailController.h" +#import "FolderDetailViewController.h" @implementation FolderFirstLevelController @synthesize list; @@ -33,10 +33,12 @@ -(IBAction)toggleEdit:(id)sender { } - (IBAction)toggleAdd:(id)sender { - FolderDetailController *folderDetail = [[FolderDetailController alloc] initWithStyle:UITableViewStyleGrouped]; + FolderDetailViewController *folderDetail = [[FolderDetailViewController alloc] initWithStyle:UITableViewStyleGrouped andParent:self]; folderDetail.title = @"New Folder"; - [self.navigationController pushViewController:folderDetail animated:YES]; + UINavigationController* nc = [[UINavigationController alloc] initWithRootViewController:folderDetail]; [folderDetail release]; + [self presentModalViewController:nc animated:YES]; + [nc release]; } - (void)viewDidLoad { @@ -211,7 +213,7 @@ - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexP [self.navigationItem.leftBarButtonItem setTitle:@"Edit"]; [self.navigationItem.leftBarButtonItem setStyle:UIBarButtonItemStyleBordered]; - FolderDetailController *folderDetail = [[FolderDetailController alloc] initWithStyle:UITableViewStyleGrouped andFolder:folder]; + FolderDetailViewController *folderDetail = [[FolderDetailViewController alloc] initWithStyle:UITableViewStyleGrouped andParent:self andFolder:folder]; folderDetail.title = folder.name; [self.navigationController pushViewController:folderDetail animated:YES]; [folderDetail release]; @@ -230,6 +232,35 @@ - (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPat return YES; } +- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { + if([indexPath section] == 0) + return NO; + return YES; +} +- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { + NSNumber *fromRow = [[NSNumber alloc] initWithInt:[fromIndexPath row]]; + NSNumber *toRow = [[NSNumber alloc] initWithInt:[toIndexPath row]]; + + Folder *fromObject = [self.list objectAtIndex:[fromIndexPath row]]; + fromObject.order = toRow; + Folder *toObject = [self.list objectAtIndex:[toIndexPath row]]; + fromObject.order = fromRow; + + NSError *error; + DLog ("Try to update Folders (ordering)"); + if(![FolderDAO updateFolder:fromObject error:&error] || ![FolderDAO updateFolder:toObject error:&error] ) { + ALog ("Error occured while updating Folder (ordering)"); + } + else { + ALog ("Folder updated (ordering)"); + ALog ("Folder: %@, Order: %d", toObject.name, toObject.order); + ALog ("Folder: %@, Order: %d", fromObject.name, fromObject.order); + } + + [fromRow release]; + [toRow release]; +} + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// #pragma mark - #pragma mark Custom Methods diff --git a/Classes/TagDetailController.h b/Classes/TagDetailController.h deleted file mode 100644 index 03c2f25..0000000 --- a/Classes/TagDetailController.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// TagDetailController.h -// Less2Do -// -// Created by Philip Messlehner on 30.11.09. -// Copyright 2009 __MyCompanyName__. All rights reserved. -// - -#import - - -#define NAME_ROW_INDEX 0 -#define NUMBER_OF_EDITABLE_ROWS 1 - -#define LABEL_TAG 4096 - -@interface TagDetailController : UITableViewController { - Tag *tag; - NSArray *fieldLabels; - NSMutableDictionary *tempValues; - UITextField *textFieldBeingEdited; -} - -@property (nonatomic, retain) Tag *tag; -@property (nonatomic, retain) NSArray *fieldLabels; -@property (nonatomic, retain) NSMutableDictionary *tempValues; -@property (nonatomic, retain) UITextField *textFieldBeingEdited; - -- (id)initWithStyle:(UITableViewStyle)aStyle andTag:(Tag *)aTag; - -- (IBAction)cancel:(id)sender; -- (IBAction)save:(id)sender; -- (IBAction)textFieldDone:(id)sender; - -@end diff --git a/Classes/TagDetailController.m b/Classes/TagDetailController.m deleted file mode 100644 index 0326229..0000000 --- a/Classes/TagDetailController.m +++ /dev/null @@ -1,224 +0,0 @@ -// -// TagDetailController.m -// Less2Do -// -// Created by Philip Messlehner on 30.11.09. -// Copyright 2009 __MyCompanyName__. All rights reserved. -// - -#import "TagDetailController.h" -#import "TagsFirstLevelController.h" -#import "TasksListViewController.h" -#import "TagDAO.h" -#import "Tag.h" - -@implementation TagDetailController - -@synthesize tag; -@synthesize fieldLabels; -@synthesize tempValues; -@synthesize textFieldBeingEdited; - -- (id) initWithStyle:(UITableViewStyle)aStyle andTag:(Tag *)aTag { - if(![super initWithStyle:aStyle]) - return nil; - - self.tag = aTag; - return self; -} - -// Pressing Cancel will pop the actuel View away -- (IBAction) cancel:(id)sender { - [self.navigationController popViewControllerAnimated:YES]; -} - -- (IBAction) save:(id)sender { - - // Save was touched while Editing a Textfield -> store the Input in tempValues - if(textFieldBeingEdited != nil) { - NSNumber *tagAsNum = [[NSNumber alloc] initWithInt:textFieldBeingEdited.tag]; - [tempValues setObject:textFieldBeingEdited.text forKey:tagAsNum]; - [tagAsNum release]; - } - - // Update - if (tag != nil) { - NSNumber *key = [[NSNumber alloc] initWithInt:NAME_ROW_INDEX]; - if ([[tempValues allKeys] containsObject:key]) { - if([[tempValues objectForKey:key] length]==0) { - [key release]; - ALog ("Invalid Input"); - return; - } - tag.name = [tempValues objectForKey:key]; - } - [key release]; - - NSError *error; - DLog ("Try to update Tag '%@'", tag.name); - if(![TagDAO updateTag:tag error:&error]) { - ALog ("Error occured while updating Tag"); - } - else { - ALog ("Tag updated"); - } - } - // Insert - else { - // Only Saves when text was entered - NSNumber *key = [[NSNumber alloc] initWithInt:NAME_ROW_INDEX]; - NSString *tagName = [tempValues objectForKey:key]; - [key release]; - - if(tagName == nil || [tagName length] == 0) - return; - - NSError *error; - tag = [TagDAO addTagWithName:tagName error:&error]; - - NSArray *allControllers = self.navigationController.viewControllers; - - if ([allControllers count]>1) { - UIViewController *oneController = [allControllers objectAtIndex:[allControllers count]-2]; - - if([oneController isKindOfClass:[TagsFirstLevelController class]]) { - TagsFirstLevelController *parent = (TagsFirstLevelController *) oneController; - TasksListViewController *tagView = [[TasksListViewController alloc] initWithStyle:UITableViewStylePlain]; - tagView.title = tag.name; - tagView.image = [UIImage imageNamed:@"all_tasks.png"]; - [parent.controllersSection1 addObject:tagView]; - [parent.list addObject:tag]; - [tagView release]; - } - } - - } - - [self.navigationController popViewControllerAnimated:YES]; -} - - -// Hides the Keyboard after Touching "Done" -- (IBAction) textFieldDone:(id)sender { - [sender resignFirstResponder]; -} - -#pragma mark - -- (void) viewDidLoad { - NSArray *array = [[NSArray alloc] initWithObjects:@"Name:", nil]; - self.fieldLabels = array; - [array release]; - - UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithTitle:@"Cancel" - style:UIBarButtonItemStyleBordered - target:self - action:@selector(cancel:)]; - self.navigationItem.leftBarButtonItem = cancelButton; - [cancelButton release]; - - UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithTitle:@"Save" - style:UIBarButtonItemStyleDone - target:self - action:@selector(save:)]; - self.navigationItem.rightBarButtonItem = saveButton; - [saveButton release]; - - NSMutableDictionary *dict = [[NSMutableDictionary alloc] init]; - self.tempValues = dict; - [dict release]; - [super viewDidLoad]; -} - -- (void) dealloc { - [textFieldBeingEdited release]; - [tempValues release]; - [tag release]; - [fieldLabels release]; - - [super dealloc]; -} - -#pragma mark - -#pragma mark Table Data Source Methods -- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - return NUMBER_OF_EDITABLE_ROWS; -} - -- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - static NSString *cellID = @"TagsEditCellID"; - - UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID]; - - if (cell == nil) { - cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID] autorelease]; - - UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10,10,75,25)]; - - label.textAlignment = UITextAlignmentRight; - label.tag = LABEL_TAG; - label.font = [UIFont boldSystemFontOfSize:14]; - [cell.contentView addSubview:label]; - [label release]; - - UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(90, 12, 200, 25)]; - textField.clearsOnBeginEditing = NO; - [textField setDelegate:self]; - textField.returnKeyType = UIReturnKeyDone; - textField.autocorrectionType = UITextAutocorrectionTypeNo; - [textField addTarget:self action:@selector(textFieldDone:) forControlEvents:UIControlEventEditingDidEndOnExit]; - [cell.contentView addSubview:textField]; - - } - - NSUInteger row = [indexPath row]; - - UILabel *label = (UILabel *)[cell viewWithTag:LABEL_TAG]; - UITextField *textField = nil; - for (UIView *oneView in cell.contentView.subviews) { - if([oneView isMemberOfClass:[UITextField class]]) - textField = (UITextField *)oneView; - } - - label.text = [fieldLabels objectAtIndex:row]; - NSNumber *rowAsNum = [[NSNumber alloc] initWithInt:row]; - - switch (row) { - case NAME_ROW_INDEX: - if([[tempValues allKeys] containsObject:rowAsNum]) - textField.text = [tempValues objectForKey:rowAsNum]; - else if (tag != nil) - textField.text = tag.name; - textField.placeholder = @"Enter Tag-Name"; - break; - default: - break; - } - - if(textFieldBeingEdited == textField) - textFieldBeingEdited = nil; - - textField.tag = row; - [rowAsNum release]; - - return cell; -} - -#pragma mark - -#pragma mark Table Delegate Methods - -- (NSIndexPath *) tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath { - return nil; -} - -#pragma mark Text Field Delegate Methods -- (void) textFieldDidBeginEditing:(UITextField *)textField { - self.textFieldBeingEdited = textField; -} - -- (void) textFieldDidEndEditing:(UITextField *)textField { - NSNumber *tagAsNum = [[NSNumber alloc] initWithInt:textField.tag]; - [tempValues setObject:textField.text forKey:tagAsNum]; - [tagAsNum release]; -} - -@end \ No newline at end of file diff --git a/Classes/TagsFirstLevelController.m b/Classes/TagsFirstLevelController.m index d71e9e1..cfb6599 100644 --- a/Classes/TagsFirstLevelController.m +++ b/Classes/TagsFirstLevelController.m @@ -7,7 +7,7 @@ // #import "TagsFirstLevelController.h" -#import "TagDetailController.h" +#import "TagDetailViewController.h" #import "TasksListViewController.h" #import "TagDAO.h" @@ -33,10 +33,12 @@ -(IBAction)toggleEdit:(id)sender { } - (IBAction)toggleAdd:(id)sender { - TagDetailController *tagDetail = [[TagDetailController alloc] initWithStyle:UITableViewStyleGrouped]; + TagDetailViewController *tagDetail = [[TagDetailViewController alloc] initWithStyle:UITableViewStyleGrouped andParent:self]; tagDetail.title = @"New Tag"; - [self.navigationController pushViewController:tagDetail animated:YES]; + UINavigationController* nc = [[UINavigationController alloc] initWithRootViewController:tagDetail]; [tagDetail release]; + [self presentModalViewController:nc animated:YES]; + [nc release]; } - (void)viewDidLoad { @@ -84,34 +86,7 @@ - (void)viewDidLoad { self.controllersSection1 = array; self.title = @"Tags"; [array release]; - [super viewDidLoad]; - - /* init Second-Level Views in Section Tags - TasksListViewController *tag1 = [[TasksListViewController alloc] initWithStyle:UITableViewStylePlain]; - tag1.title = @"@Tag1"; - tag1.image = [UIImage imageNamed:@"all_tasks.png"]; - [array addObject:tag1]; - [tag1 release]; - - // init Second-Level Views in Section Tags - TasksListViewController *tag2 = [[TasksListViewController alloc] initWithStyle:UITableViewStylePlain]; - tag2.title = @"@Tag2"; - tag2.image = [UIImage imageNamed:@"all_tasks.png"]; - [array addObject:tag2]; - [tag2 release]; - - // init Second-Level Views in Section Tags - TasksListViewController *tag3 = [[TasksListViewController alloc] initWithStyle:UITableViewStylePlain]; - tag3.title = @"@Tag3"; - tag3.image = [UIImage imageNamed:@"all_tasks.png"]; - [array addObject:tag3]; - [tag3 release]; - - // tags make up section1 - self.controllersSection1 = array; - [array release]; - self.title = @"Tags"; - [super viewDidLoad];*/ + [super viewDidLoad]; } - (void)viewWillAppear:(BOOL)animated { @@ -228,7 +203,7 @@ - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexP [self.navigationItem.leftBarButtonItem setTitle:@"Edit"]; [self.navigationItem.leftBarButtonItem setStyle:UIBarButtonItemStyleBordered]; - TagDetailController *tagDetail = [[TagDetailController alloc] initWithStyle:UITableViewStyleGrouped andTag:tag]; + TagDetailViewController *tagDetail = [[TagDetailViewController alloc] initWithStyle:UITableViewStyleGrouped andParent:self andTag:tag]; tagDetail.title = tag.name; [self.navigationController pushViewController:tagDetail animated:YES]; [tagDetail release]; diff --git a/ContextDAOTest.m b/ContextDAOTest.m index 2b0adf1..f9a5566 100644 --- a/ContextDAOTest.m +++ b/ContextDAOTest.m @@ -15,8 +15,6 @@ @interface ContextDAOTest : GHTestCase { NSManagedObjectContext* managedObjectContext; } -- (void)testAddContextWithNameWithoutTitle; - @end @implementation ContextDAOTest @@ -46,12 +44,50 @@ - (void)tearDown { appDelegate = nil; } -/* Tests adding a context without a context parameter */ -- (void)testAddContextWithNameWithoutTitle { +/* Tests receiving all contexts without adding contexts before */ +- (void)testAllContextsEmpty { + NSError *error = nil; + NSArray *contexts = [ContextDAO allContexts:&error]; + GHAssertEquals([contexts count], (NSUInteger)0, @"Context count must be 0"); +} + +/* Tests adding a context with nil as name */ +- (void)testAddContextWithNameWithNilTitle { NSError *error = nil; Context *returnValue = [ContextDAO addContextWithName:nil error:&error]; - GHAssertTrue([error code] == DAOMissingParametersError, @"Context must not be added without name"); - GHAssertTrue(returnValue == nil, @"Return value must be nil."); + GHAssertEquals([error code], DAOMissingParametersError, @"Context must not be added without name"); + GHAssertNil(returnValue, @"Return value must be nil."); +} + +/* Tests adding a context with empty string as name */ +- (void)testAddContextWithNameWithEmptyTitle { + NSError *error = nil; + Context *returnValue = [ContextDAO addContextWithName:@"" error:&error]; + GHAssertEquals([error code], DAOMissingParametersError, @"Context must not be added without name"); + GHAssertNil(returnValue, @"Return value must be nil."); +} + +/* adds 3 contexts - count must be 3 */ +- (void)testAddContextWithName { + NSError *error = nil; + + Context *newContext1 = [ContextDAO addContextWithName:@"Test generated 1" error:&error]; + GHAssertNotNil(newContext1, @"Add context1 not successful"); + Context *newContext2 = [ContextDAO addContextWithName:@"Test generated 2" error:&error]; + GHAssertNotNil(newContext2, @"Add context2 not successful"); + Context *newContext3 = [ContextDAO addContextWithName:@"Test generated 3" error:&error]; + GHAssertNotNil(newContext3, @"Add context3 not successful"); + + NSArray *contexts = [ContextDAO allContexts:&error]; + GHAssertEquals([contexts count], (NSUInteger)5, @"Add context not successful"); +} + +/* Tests deleting a context with nil as parameter */ +- (void)testDeleteContextWithNilParameter { + NSError *error = nil; + BOOL returnValue = [ContextDAO deleteContext:nil error:&error]; + GHAssertEquals([error code], DAOMissingParametersError, @"Context must not be deleted without reference"); + GHAssertFalse(returnValue, @"Return value must be NO."); } /* first adds a context and then deletes it - count then must be 0 */ @@ -70,4 +106,32 @@ - (void)testDeleteContext { GHAssertEquals([contexts count], (NSUInteger)0, @"Delete context not successful"); } +/* Tests updating a context with nil as parameter */ +- (void)testUpdateContextWithNilParameter { + NSError *error = nil; + BOOL returnValue = [ContextDAO updateContext:nil error:&error]; + GHAssertEquals([error code], DAOMissingParametersError, @"Context must not be updated without reference"); + GHAssertFalse(returnValue, @"Return value must be NO."); +} + +/* first adds a context and then updates it */ +- (void)testUpdateContext { + NSError *error = nil; + Context *newContext = [ContextDAO addContextWithName:@"Test generated" error:&error]; + GHAssertNotNil(newContext, @"Add context not successful"); + + newContext.name = @"UPDATE"; + BOOL updateSuccessful = [ContextDAO updateContext:newContext error:&error]; + GHAssertTrue(updateSuccessful, @"Update context not successful"); + + GHAssertTrue([newContext isUpdated], @"Update context not successful"); + + /*//[NSThread sleepForTimeInterval:2]; + + NSArray *contexts = [ContextDAO allContexts:&error]; + GHAssertEquals([contexts count], (NSUInteger)1, @"Add context not successful"); + Context *context = [contexts objectAtIndex:0]; + GHAssertEqualStrings([context name], [newContext name], @"Update context not successful"); */ +} + @end \ No newline at end of file diff --git a/Less2Do.xcodeproj/gerhard.perspectivev3 b/Less2Do.xcodeproj/gerhard.perspectivev3 index 9607dfe..c5b7a84 100644 --- a/Less2Do.xcodeproj/gerhard.perspectivev3 +++ b/Less2Do.xcodeproj/gerhard.perspectivev3 @@ -278,17 +278,20 @@ 29B97317FDCFA39411CA2CEA 29B97323FDCFA39411CA2CEA 1C37FBAC04509CD000000102 + A3F5B54F10C67B0B0054A7FE + A3F5B55010C67B0B0054A7FE PBXSmartGroupTreeModuleOutlineStateSelectionKey - 48 - 4 - 0 + 80 + 75 + 72 + 70 PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 270}, {344, 764}} + {{0, 697}, {344, 764}} PBXTopSmartGroupGIDs @@ -323,7 +326,7 @@ PBXProjectModuleGUID A3E3383E10BC4160004F0F39 PBXProjectModuleLabel - Less2DoAppDelegate.m + ContextDAOTest.m PBXSplitModuleInNavigatorKey Split0 @@ -331,22 +334,23 @@ PBXProjectModuleGUID A3E3383F10BC4160004F0F39 PBXProjectModuleLabel - Less2DoAppDelegate.m + ContextDAOTest.m _historyCapacity 0 bookmark - A3C7242D10C493E00025747C + A3F5B61310C683480054A7FE history A3CF9F0F10C414D80096B8CD A3517ECB10C4403600DEEB5C A3517ECC10C4403600DEEB5C A3517ECE10C4403600DEEB5C - A3C723EE10C48F780025747C A3C723EF10C48F780025747C - A3C723F910C48F8A0025747C A3C7241A10C491430025747C - A3C7241E10C4917D0025747C + A3F5B54B10C67B0A0054A7FE + A3F5B56D10C67EA50054A7FE + A3F5B60010C683040054A7FE + A3F5B61210C683440054A7FE SplitCount @@ -360,18 +364,18 @@ GeometryConfiguration Frame - {{0, 0}, {1022, 473}} + {{0, 0}, {1022, 457}} RubberWindowFrame 52 55 1388 823 0 0 1440 878 Module PBXNavigatorGroup Proportion - 473pt + 457pt Proportion - 304pt + 320pt Tabs @@ -385,7 +389,7 @@ GeometryConfiguration Frame - {{10, 27}, {1022, 277}} + {{10, 27}, {1022, 293}} RubberWindowFrame 52 55 1388 823 0 0 1440 878 @@ -469,11 +473,11 @@ TableOfContents - A3C7240910C4906B0025747C + A3F5B52A10C6771F0054A7FE 1CA23ED40692098700951B8B - A3C7240A10C4906B0025747C + A3F5B52B10C6771F0054A7FE A3E3383E10BC4160004F0F39 - A3C7240B10C4906B0025747C + A3F5B52C10C6771F0054A7FE 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -524,12 +528,12 @@ GeometryConfiguration Frame - {{0, 0}, {1388, 229}} + {{0, 0}, {1388, 214}} Module PBXDebugCLIModule Proportion - 229pt + 214pt ContentConfiguration @@ -548,8 +552,8 @@ yes sizes - {{0, 0}, {677, 266}} - {{677, 0}, {711, 266}} + {{0, 0}, {677, 272}} + {{677, 0}, {711, 272}} VerticalSplitView @@ -564,8 +568,8 @@ yes sizes - {{0, 0}, {1388, 266}} - {{0, 266}, {1388, 282}} + {{0, 0}, {1388, 272}} + {{0, 272}, {1388, 291}} @@ -585,7 +589,7 @@ DebugSTDIOWindowFrame {{200, 200}, {500, 300}} Frame - {{0, 234}, {1388, 548}} + {{0, 219}, {1388, 563}} PBXDebugSessionStackFrameViewKey DebugVariablesTableConfiguration @@ -598,13 +602,13 @@ 481 Frame - {{677, 0}, {711, 266}} + {{677, 0}, {711, 272}} Module PBXDebugSessionModule Proportion - 548pt + 563pt Name @@ -622,13 +626,13 @@ TableOfContents - A3C7241310C490790025747C + A3F5B53D10C677870054A7FE 1CCC7628064C1048000F2A68 1CCC7629064C1048000F2A68 - A3C7241410C490790025747C - A3C7241510C490790025747C - A3C7241610C490790025747C - A3C7241710C490790025747C + A3F5B53E10C677870054A7FE + A3F5B53F10C677870054A7FE + A3F5B54010C677870054A7FE + A3F5B54110C677870054A7FE A3E3383E10BC4160004F0F39 ToolbarConfigUserDefaultsMinorVersion diff --git a/Less2Do.xcodeproj/philip.perspectivev3 b/Less2Do.xcodeproj/philip.perspectivev3 index 117afb0..21362bb 100644 --- a/Less2Do.xcodeproj/philip.perspectivev3 +++ b/Less2Do.xcodeproj/philip.perspectivev3 @@ -222,52 +222,11 @@ OpenEditors - - - Content - - PBXProjectModuleGUID - D4E4773610C65E8400665220 - PBXProjectModuleLabel - FolderDetailController.m - PBXSplitModuleInNavigatorKey - - Split0 - - PBXProjectModuleGUID - D4E4773710C65E8400665220 - PBXProjectModuleLabel - FolderDetailController.m - _historyCapacity - 0 - bookmark - D4E4777510C66B3E00665220 - history - - D4E4773110C65E2A00665220 - - - SplitCount - 1 - - StatusBarVisibility - - - Geometry - - Frame - {{0, 20}, {988, 578}} - PBXModuleWindowStatusBarHidden2 - - RubberWindowFrame - 1786 -61 988 619 1680 -190 1280 800 - - - + PerspectiveWidths - 1634 - 1634 + 1234 + 1234 Perspectives @@ -321,7 +280,7 @@ PBXSmartGroupTreeModuleColumnWidthsKey - 321 + 282 PBXSmartGroupTreeModuleColumnsKey_v4 @@ -333,6 +292,7 @@ PBXSmartGroupTreeModuleOutlineStateExpansionKey 29B97314FDCFA39411CA2CEA + A38B3ADF10BFFB7A00D5D87F 080E96DDFE201D6D7F000001 39C6CF9210BECEA8000A0C70 39C6D00210BEDED2000A0C70 @@ -342,7 +302,6 @@ 39B6584A10B6168600825C1D 39A1F30A10B9ECDF00671B42 39C6CF9010BECE95000A0C70 - A3E338A410BC5C80004F0F39 A3E3393210BC76D7004F0F39 29B97315FDCFA39411CA2CEA 29B97317FDCFA39411CA2CEA @@ -356,15 +315,15 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey - 32 - 26 - 3 - 2 + 59 + 54 + 52 + 4 0 PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {321, 914}} + {{0, 560}, {282, 664}} PBXTopSmartGroupGIDs @@ -374,17 +333,17 @@ GeometryConfiguration Frame - {{0, 0}, {338, 932}} + {{0, 0}, {299, 682}} GroupTreeTableConfiguration MainColumn - 321 + 282 Module PBXSmartGroupTreeModule Proportion - 338pt + 299pt Dock @@ -395,7 +354,7 @@ PBXProjectModuleGUID D436E84D10BA700F00EA7624 PBXProjectModuleLabel - TagDetailController.m + FolderDetailViewController.m PBXSplitModuleInNavigatorKey Split0 @@ -403,11 +362,11 @@ PBXProjectModuleGUID D436E84E10BA700F00EA7624 PBXProjectModuleLabel - TagDetailController.m + FolderDetailViewController.m _historyCapacity 0 bookmark - D4E4777410C66B3E00665220 + D471C1B810C8FC6300429424 history D436E88810BA811100EA7624 @@ -440,7 +399,6 @@ D4E6A7F210BECDD500AEFE2F D4E6A89010BEE20300AEFE2F D4E6A97610BFEAA500AEFE2F - D45C30CC10C00F2700B59FE0 D46A608910C3A60300FBC5EB D46A60C710C3A86700FBC5EB D46A61C810C3B95E00FBC5EB @@ -455,31 +413,37 @@ D46A644D10C40A0100FBC5EB D46A644E10C40A0100FBC5EB D4E474CB10C52E9B00665220 - D4E474CD10C52E9B00665220 - D4E4755510C5555000665220 - D4E4755610C5555000665220 D4E4759F10C55E5300665220 D4E475D410C5628100665220 - D4E4762110C56FE800665220 - D4E4762210C56FE800665220 D4E4763110C5749D00665220 D4E4763410C5749D00665220 D4E4763710C5749D00665220 D4E4763810C5749D00665220 - D4E4764D10C58A6900665220 D4E4764F10C58A6900665220 D4E4765010C58A6900665220 D4E4765110C58A6900665220 - D4E4767B10C64E3F00665220 D4E476F410C6567500665220 - D4E476FB10C656A900665220 - D4E4773910C65F1100665220 - D4E4773B10C65F1100665220 - D4E4773C10C65F1100665220 D4E4776F10C66B3E00665220 - D4E4777010C66B3E00665220 - D4E4777110C66B3E00665220 - D4E4777210C66B3E00665220 + D4E4779610C6790E00665220 + D4E4779710C6790E00665220 + D46CA55610C7FE8A0037472F + D46CA56610C7FEE30037472F + D46CA59910C802710037472F + D46CA59A10C802710037472F + D46CA59C10C802710037472F + D46CA5BA10C80B660037472F + D46CA5D810C80DBA0037472F + D46CA5ED10C80F8A0037472F + D471C15510C8F29600429424 + D471C17110C8F4DD00429424 + D471C17210C8F4DD00429424 + D471C17310C8F4DD00429424 + D471C17410C8F4DD00429424 + D471C17510C8F4DD00429424 + D471C17710C8F4DD00429424 + D471C1B310C8FC2400429424 + D471C1B410C8FC2400429424 + D471C1B510C8FC2400429424 SplitCount @@ -493,16 +457,16 @@ GeometryConfiguration Frame - {{0, 0}, {1291, 710}} + {{0, 0}, {930, 492}} Module PBXNavigatorGroup Proportion - 710pt + 492pt Proportion - 217pt + 185pt Tabs @@ -516,7 +480,7 @@ GeometryConfiguration Frame - {{10, 27}, {1291, 190}} + {{10, 27}, {930, 158}} Module XCDetailModule @@ -570,7 +534,7 @@ GeometryConfiguration Frame - {{10, 27}, {1291, 190}} + {{10, 27}, {930, 158}} Module PBXBuildResultsModule @@ -579,7 +543,7 @@ Proportion - 1291pt + 930pt Name @@ -598,11 +562,11 @@ TableOfContents - D4E4768110C64E4000665220 + D471C14710C8F18A00429424 1CA23ED40692098700951B8B - D4E4768210C64E4000665220 + D471C14810C8F18A00429424 D436E84D10BA700F00EA7624 - D4E4768310C64E4000665220 + D471C14910C8F18A00429424 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -655,14 +619,14 @@ GeometryConfiguration Frame - {{0, 0}, {1634, 356}} + {{0, 0}, {1234, 190}} RubberWindowFrame - 46 55 1634 973 0 0 1680 1028 + 46 55 1234 723 0 0 1280 778 Module PBXDebugCLIModule Proportion - 356pt + 190pt ContentConfiguration @@ -681,8 +645,8 @@ yes sizes - {{0, 0}, {797, 278}} - {{797, 0}, {837, 278}} + {{0, 0}, {602, 238}} + {{602, 0}, {632, 238}} VerticalSplitView @@ -697,8 +661,8 @@ yes sizes - {{0, 0}, {1634, 278}} - {{0, 278}, {1634, 293}} + {{0, 0}, {1234, 238}} + {{0, 238}, {1234, 249}} @@ -718,7 +682,7 @@ DebugSTDIOWindowFrame {{200, 200}, {500, 300}} Frame - {{0, 361}, {1634, 571}} + {{0, 195}, {1234, 487}} PBXDebugSessionStackFrameViewKey DebugVariablesTableConfiguration @@ -728,20 +692,20 @@ Value 85 Summary - 514 + 309 Frame - {{797, 0}, {837, 278}} + {{602, 0}, {632, 238}} RubberWindowFrame - 46 55 1634 973 0 0 1680 1028 + 46 55 1234 723 0 0 1280 778 RubberWindowFrame - 46 55 1634 973 0 0 1680 1028 + 46 55 1234 723 0 0 1280 778 Module PBXDebugSessionModule Proportion - 571pt + 487pt Name @@ -759,13 +723,13 @@ TableOfContents - D4E4768410C64E4000665220 + D471C14A10C8F18A00429424 1CCC7628064C1048000F2A68 1CCC7629064C1048000F2A68 - D4E4768510C64E4000665220 - D4E4768610C64E4000665220 - D4E4768710C64E4000665220 - D4E4768810C64E4000665220 + D471C14B10C8F18A00429424 + D471C14C10C8F18A00429424 + D471C14D10C8F18A00429424 + D471C14E10C8F18A00429424 D436E84D10BA700F00EA7624 ToolbarConfigUserDefaultsMinorVersion @@ -783,7 +747,7 @@ StatusbarIsVisible TimeStamp - 281439038.87263399 + 281607267.78645301 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -800,11 +764,10 @@ 5 WindowOrderList - D4E4773610C65E8400665220 /Users/philip/Coding/XCode/Less-2-Do/Less2Do.xcodeproj WindowString - 46 55 1634 973 0 0 1680 1028 + 46 55 1234 723 0 0 1280 778 WindowToolsV3 diff --git a/Less2Do.xcodeproj/project.pbxproj b/Less2Do.xcodeproj/project.pbxproj index a36a98a..d28339d 100755 --- a/Less2Do.xcodeproj/project.pbxproj +++ b/Less2Do.xcodeproj/project.pbxproj @@ -94,9 +94,9 @@ D436E98B10BAB7F100EA7624 /* SettingsFirstLevelController.m in Sources */ = {isa = PBXBuildFile; fileRef = D436E98A10BAB7F100EA7624 /* SettingsFirstLevelController.m */; }; D436E99510BAB94100EA7624 /* SettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D436E99410BAB94100EA7624 /* SettingsViewController.m */; }; D436E9C410BABB6900EA7624 /* SettingsTableView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D436E9C310BABB6900EA7624 /* SettingsTableView.xib */; }; - D45C314F10C015BF00B59FE0 /* ContextDetailController.m in Sources */ = {isa = PBXBuildFile; fileRef = D45C314E10C015BF00B59FE0 /* ContextDetailController.m */; }; - D46A63F910C3EBDD00FBC5EB /* TagDetailController.m in Sources */ = {isa = PBXBuildFile; fileRef = D46A63F810C3EBDD00FBC5EB /* TagDetailController.m */; }; - D46A641A10C3F21700FBC5EB /* FolderDetailController.m in Sources */ = {isa = PBXBuildFile; fileRef = D46A641910C3F21700FBC5EB /* FolderDetailController.m */; }; + D45C314F10C015BF00B59FE0 /* ContextDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D45C314E10C015BF00B59FE0 /* ContextDetailViewController.m */; }; + D46A63F910C3EBDD00FBC5EB /* TagDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D46A63F810C3EBDD00FBC5EB /* TagDetailViewController.m */; }; + D46A641A10C3F21700FBC5EB /* FolderDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D46A641910C3F21700FBC5EB /* FolderDetailViewController.m */; }; D4E4762A10C571E600665220 /* ColorChooserCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D4E4762910C571E600665220 /* ColorChooserCell.m */; }; D4E4762D10C5733D00665220 /* ColorChooserCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = D4E4762C10C5733D00665220 /* ColorChooserCell.xib */; }; /* End PBXBuildFile section */ @@ -276,12 +276,12 @@ D436E99310BAB94100EA7624 /* SettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsViewController.h; sourceTree = ""; }; D436E99410BAB94100EA7624 /* SettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingsViewController.m; sourceTree = ""; }; D436E9C310BABB6900EA7624 /* SettingsTableView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SettingsTableView.xib; sourceTree = ""; }; - D45C314D10C015BF00B59FE0 /* ContextDetailController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContextDetailController.h; sourceTree = ""; }; - D45C314E10C015BF00B59FE0 /* ContextDetailController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContextDetailController.m; sourceTree = ""; }; - D46A63F710C3EBDD00FBC5EB /* TagDetailController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagDetailController.h; sourceTree = ""; }; - D46A63F810C3EBDD00FBC5EB /* TagDetailController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TagDetailController.m; sourceTree = ""; }; - D46A641810C3F21700FBC5EB /* FolderDetailController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FolderDetailController.h; sourceTree = ""; }; - D46A641910C3F21700FBC5EB /* FolderDetailController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FolderDetailController.m; sourceTree = ""; }; + D45C314D10C015BF00B59FE0 /* ContextDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContextDetailViewController.h; sourceTree = ""; }; + D45C314E10C015BF00B59FE0 /* ContextDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContextDetailViewController.m; sourceTree = ""; }; + D46A63F710C3EBDD00FBC5EB /* TagDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagDetailViewController.h; sourceTree = ""; }; + D46A63F810C3EBDD00FBC5EB /* TagDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TagDetailViewController.m; sourceTree = ""; }; + D46A641810C3F21700FBC5EB /* FolderDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FolderDetailViewController.h; sourceTree = ""; }; + D46A641910C3F21700FBC5EB /* FolderDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FolderDetailViewController.m; sourceTree = ""; }; D4E4762810C571E600665220 /* ColorChooserCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorChooserCell.h; sourceTree = ""; }; D4E4762910C571E600665220 /* ColorChooserCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ColorChooserCell.m; sourceTree = ""; }; D4E4762C10C5733D00665220 /* ColorChooserCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ColorChooserCell.xib; sourceTree = ""; }; @@ -498,12 +498,12 @@ 39B658FF10B6B31200825C1D /* contexts */ = { isa = PBXGroup; children = ( - D45C314D10C015BF00B59FE0 /* ContextDetailController.h */, - D45C314E10C015BF00B59FE0 /* ContextDetailController.m */, - 39B6590210B6B36F00825C1D /* ContextsNavigationController.h */, - 39B6590310B6B36F00825C1D /* ContextsNavigationController.m */, + D45C314D10C015BF00B59FE0 /* ContextDetailViewController.h */, + D45C314E10C015BF00B59FE0 /* ContextDetailViewController.m */, 39B6590510B6B3A100825C1D /* ContextsFirstLevelViewController.h */, 39B6590610B6B3A100825C1D /* ContextsFirstLevelViewController.m */, + 39B6590210B6B36F00825C1D /* ContextsNavigationController.h */, + 39B6590310B6B36F00825C1D /* ContextsNavigationController.m */, ); name = contexts; sourceTree = ""; @@ -511,12 +511,12 @@ 39B6590010B6B32600825C1D /* folder */ = { isa = PBXGroup; children = ( + D46A641810C3F21700FBC5EB /* FolderDetailViewController.h */, + D46A641910C3F21700FBC5EB /* FolderDetailViewController.m */, D436E8B510BA877300EA7624 /* FolderFirstLevelController.h */, D436E8B610BA877300EA7624 /* FolderFirstLevelController.m */, D436E8B110BA86AA00EA7624 /* FolderNavigationController.h */, D436E8B210BA86AA00EA7624 /* FolderNavigationController.m */, - D46A641810C3F21700FBC5EB /* FolderDetailController.h */, - D46A641910C3F21700FBC5EB /* FolderDetailController.m */, ); name = folder; sourceTree = ""; @@ -524,12 +524,12 @@ 39B6590110B6B32D00825C1D /* tags */ = { isa = PBXGroup; children = ( + D46A63F710C3EBDD00FBC5EB /* TagDetailViewController.h */, + D46A63F810C3EBDD00FBC5EB /* TagDetailViewController.m */, D436E8A810BA858E00EA7624 /* TagsFirstLevelController.h */, D436E8A910BA858E00EA7624 /* TagsFirstLevelController.m */, D436E8AA10BA858E00EA7624 /* TagsNavigationController.h */, D436E8AB10BA858E00EA7624 /* TagsNavigationController.m */, - D46A63F710C3EBDD00FBC5EB /* TagDetailController.h */, - D46A63F810C3EBDD00FBC5EB /* TagDetailController.m */, ); name = tags; sourceTree = ""; @@ -923,10 +923,10 @@ 3902C55310C01F09006BBF52 /* TaskEditDueDateViewController.m in Sources */, 39D0532410C036DF0020D7D9 /* TaskEditDueTimeViewController.m in Sources */, CFF3177810C00B79004222B6 /* FolderDAO.m in Sources */, - D45C314F10C015BF00B59FE0 /* ContextDetailController.m in Sources */, + D45C314F10C015BF00B59FE0 /* ContextDetailViewController.m in Sources */, CF25612110C2820500019621 /* TaskDAO.m in Sources */, - D46A63F910C3EBDD00FBC5EB /* TagDetailController.m in Sources */, - D46A641A10C3F21700FBC5EB /* FolderDetailController.m in Sources */, + D46A63F910C3EBDD00FBC5EB /* TagDetailViewController.m in Sources */, + D46A641A10C3F21700FBC5EB /* FolderDetailViewController.m in Sources */, CFF7108410C3F6CC00313030 /* TagDAO.m in Sources */, D4E4762A10C571E600665220 /* ColorChooserCell.m in Sources */, 393B5BFD10C57E0C0078C5B2 /* DAOHelper.m in Sources */,