Permalink
Browse files

Datetime editing was crashing

  • Loading branch information...
1 parent 2397210 commit 2332e8b7269756a347a3ddb174ca9bec066df3f1 @escoz escoz committed with Aug 17, 2011
Showing with 15 additions and 2 deletions.
  1. +4 −1 quickdialog/QDateTimeElement.m
  2. +10 −0 quickdialog/QDateTimeInlineElement.m
  3. +1 −1 quickdialog/QuickDialogController.h
@@ -16,8 +16,9 @@
// the animation is not smooth when using the dateselector as a keyboard
-#import "QDateTimeElement.h"
+#import "QDateTimeInlineElement.h"
+#import "QSection.h"
@interface QDateTimeElement ()
- (void)initializeRoot;
@@ -127,7 +128,9 @@ - (void)selected:(QuickDialogTableView *)tableView controller:(QuickDialogContro
[controller displayViewController:newController];
__block QuickDialogController *controllerForBlock = newController;
+
newController.willDisappearCallback = ^{
+ NSLog(@"here");
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
[((QSection *)[controllerForBlock.root.sections objectAtIndex:0]) fetchValueIntoObject:dict];
@@ -31,6 +31,16 @@ @implementation QDateTimeInlineElement
@synthesize centerLabel = _centerLabel;
+- (QDateTimeInlineElement *)init {
+ self = [super init];
+ return self;
+}
+
+- (QDateTimeInlineElement *)initWithKey:(NSString *)key {
+ self = [super initWithKey:key];
+ return self;
+}
+
- (QDateTimeInlineElement *)initWithTitle:(NSString *)string date:(NSDate *)date {
self = [super initWithTitle:string Value:[date description]];
if (self!=nil){
@@ -30,7 +30,7 @@
}
@property(nonatomic, retain) QRootElement * root;
-@property(nonatomic, retain) void (^willDisappearCallback)();
+@property(nonatomic, copy) void (^willDisappearCallback)();
- (void)loadView;

0 comments on commit 2332e8b

Please sign in to comment.