aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEddie Ehlin <eddiex@eddiex.se>2013-01-14 22:11:36 +0100
committerEddie Ehlin <eddiex@eddiex.se>2013-01-14 22:11:36 +0100
commitac1de8f5356878226e38a45085a351dd9b7a8cef (patch)
treeb7e9baeaaebd71f11b0f7f8a67b353143466d1ba
parente2eb9397b85b1b6ec8a1b2b170f0d54f33f07f20 (diff)
downloadiBean-ac1de8f5356878226e38a45085a351dd9b7a8cef.tar.gz
iBean-ac1de8f5356878226e38a45085a351dd9b7a8cef.zip
Minor cleanup
-rw-r--r--iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstatebin34948 -> 34539 bytes
-rw-r--r--iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist15
-rw-r--r--iBean/iBean/AddBeanViewController.m12
-rw-r--r--iBean/iBean/BeanCollectionBeanListViewController.m14
-rw-r--r--iBean/iBean/BeanCollectionInfoViewController.m8
-rw-r--r--iBean/iBean/BeanCollectionListViewController.m4
-rw-r--r--iBean/iBean/EditBeanViewController.m12
7 files changed, 23 insertions, 42 deletions
diff --git a/iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate b/iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate
index 59502e2..b35e28b 100644
--- a/iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate
+++ b/iBean/iBean.xcodeproj/project.xcworkspace/xcuserdata/eddiex.xcuserdatad/UserInterfaceState.xcuserstate
Binary files differ
diff --git a/iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
index 05301bc..443de6d 100644
--- a/iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
+++ b/iBean/iBean.xcodeproj/xcuserdata/eddiex.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
@@ -2,4 +2,19 @@
<Bucket
type = "1"
version = "1.0">
+ <FileBreakpoints>
+ <FileBreakpoint
+ shouldBeEnabled = "Yes"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "iBean/BeanCollectionInfoViewController.m"
+ timestampString = "379890282.494638"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "129"
+ endingLineNumber = "129"
+ landmarkName = "-initWithModeAndBeanCollection::"
+ landmarkType = "5">
+ </FileBreakpoint>
+ </FileBreakpoints>
</Bucket>
diff --git a/iBean/iBean/AddBeanViewController.m b/iBean/iBean/AddBeanViewController.m
index a6dc11c..1d8a9da 100644
--- a/iBean/iBean/AddBeanViewController.m
+++ b/iBean/iBean/AddBeanViewController.m
@@ -62,18 +62,6 @@
self.grinderSettingStepper.value = [grinderSetting doubleValue];
}
}
-
- if (self.editMode == YES)
- {
- //TODO: Update UI to refelect edit mode.
-
- //+ set UI controls with values from beanCollection.
- NSLog(@"AddBeanViewController - in edit state");
- }
- else
- {
- NSLog(@"AddBeanViewController - in add new state");
- }
}
- (void) initWithModeAndBeanCollection:(BOOL)editMode: (BeanCollection*) bc
diff --git a/iBean/iBean/BeanCollectionBeanListViewController.m b/iBean/iBean/BeanCollectionBeanListViewController.m
index a7b39c8..caddd35 100644
--- a/iBean/iBean/BeanCollectionBeanListViewController.m
+++ b/iBean/iBean/BeanCollectionBeanListViewController.m
@@ -54,8 +54,6 @@
//Pass on the edit/add state and bean collection
AddBeanViewController *beanViewController = segue.destinationViewController;
[beanViewController initWithModeAndBeanCollection:self.editMode :self.beanCollection];
-
- //TODO: Check what last grinder setting was (last bean) and pre set it
}
else if ([segue.identifier isEqualToString:@"EditBeanSegue"])
{
@@ -81,18 +79,6 @@
//Load beans into the table view.
[self.beanListTableView reloadData];
-
- if (self.editMode == YES)
- {
- //TODO: Update UI to refelect edit mode.
-
- //+ set UI controls with values from beanCollection.
- NSLog(@"BeanCollectionBeanListViewController - in edit state");
- }
- else
- {
- NSLog(@"BeanCollectionBeanListViewController - in add new state");
- }
}
- (void) initWithModeAndBeanCollection:(BOOL)editMode: (BeanCollection*) bc
diff --git a/iBean/iBean/BeanCollectionInfoViewController.m b/iBean/iBean/BeanCollectionInfoViewController.m
index e9c9b95..d8d9cf9 100644
--- a/iBean/iBean/BeanCollectionInfoViewController.m
+++ b/iBean/iBean/BeanCollectionInfoViewController.m
@@ -109,6 +109,10 @@
self.beanCollectionNameTextField.text = self.beanCollection.name;
self.beanCollectionNoteTextView.text = self.beanCollection.note;
}
+ else
+ {
+ NSLog(@"BeanCollectionInfoViewController - initViewController in edit state, but bean collection is null!");
+ }
NSLog(@"BeanCollectionInfoViewController - in edit state");
}
else
@@ -163,8 +167,8 @@
- (void) cancelBeanCollection:(id)sender
{
UIAlertView *confirmCancel = [[UIAlertView alloc]
- initWithTitle:@"Cancel?"
- message:@"Are you sure you want to cancel?\n(Data entered will be lost)"
+ initWithTitle:self.editMode ? @"Cancel changes?" : @"Cancel bean collection?"
+ message:self.editMode ? @"Are you sure you want to cancel?\n(Changes entered will be lost)" : @"Are you sure you want to cancel?\n(Bean collection will be lost)"
delegate:self
cancelButtonTitle:@"Yes" otherButtonTitles:@"No", nil];
[confirmCancel show];
diff --git a/iBean/iBean/BeanCollectionListViewController.m b/iBean/iBean/BeanCollectionListViewController.m
index 236b086..5bb9b44 100644
--- a/iBean/iBean/BeanCollectionListViewController.m
+++ b/iBean/iBean/BeanCollectionListViewController.m
@@ -56,9 +56,9 @@
self.beanCollection = [(AppDelegate*) [[UIApplication sharedApplication] delegate] createBeanCollection];
[infoViewController initWithModeAndBeanCollection:NO :self.beanCollection];
}
- else if ([segue.identifier isEqualToString:@"EditBeanCollectionInfoSegue"])
+ else if ([segue.identifier isEqualToString:@"ViewBeanCollectionInfoSegue"])
{
- //Tell the view controller that we'll be handling an existing bean collection
+ //Tell the view controller that we'll be handling/viewing an existing bean collection
BeanCollectionInfoViewController *infoViewController = segue.destinationViewController;
self.beanCollection = [self.beanCollections objectAtIndex:[self.tableView indexPathForSelectedRow].row];
[infoViewController initWithModeAndBeanCollection:YES :self.beanCollection];
diff --git a/iBean/iBean/EditBeanViewController.m b/iBean/iBean/EditBeanViewController.m
index 59b3d8d..e57b470 100644
--- a/iBean/iBean/EditBeanViewController.m
+++ b/iBean/iBean/EditBeanViewController.m
@@ -61,18 +61,6 @@
{
NSLog(@"EditBeanViewController - initViewController");
- if (self.editMode == YES)
- {
- //TODO: Update UI to refelect edit mode.
-
- //+ set UI controls with values from beanCollection.
- NSLog(@"EditBeanViewController - in edit state");
- }
- else
- {
- NSLog(@"EditBeanViewController - in add new state");
- }
-
//Fetch bean data from the collection and populate the ui.
Bean *b = [self.beanCollection.beans objectAtIndex:self.editBeanIndex];
if (b != nil)