Skip to content

Commit

Permalink
Datetime editing was crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
escoz authored and ironfounderson committed Aug 26, 2011
1 parent 2397210 commit 2332e8b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
5 changes: 4 additions & 1 deletion quickdialog/QDateTimeElement.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
// the animation is not smooth when using the dateselector as a keyboard // the animation is not smooth when using the dateselector as a keyboard




#import "QDateTimeElement.h"


#import "QDateTimeInlineElement.h"
#import "QSection.h"


@interface QDateTimeElement () @interface QDateTimeElement ()
- (void)initializeRoot; - (void)initializeRoot;
Expand Down Expand Up @@ -127,7 +128,9 @@ - (void)selected:(QuickDialogTableView *)tableView controller:(QuickDialogContro
[controller displayViewController:newController]; [controller displayViewController:newController];


__block QuickDialogController *controllerForBlock = newController; __block QuickDialogController *controllerForBlock = newController;

newController.willDisappearCallback = ^{ newController.willDisappearCallback = ^{
NSLog(@"here");
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init]; NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];


[((QSection *)[controllerForBlock.root.sections objectAtIndex:0]) fetchValueIntoObject:dict]; [((QSection *)[controllerForBlock.root.sections objectAtIndex:0]) fetchValueIntoObject:dict];
Expand Down
10 changes: 10 additions & 0 deletions quickdialog/QDateTimeInlineElement.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ @implementation QDateTimeInlineElement
@synthesize centerLabel = _centerLabel; @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 { - (QDateTimeInlineElement *)initWithTitle:(NSString *)string date:(NSDate *)date {
self = [super initWithTitle:string Value:[date description]]; self = [super initWithTitle:string Value:[date description]];
if (self!=nil){ if (self!=nil){
Expand Down
2 changes: 1 addition & 1 deletion quickdialog/QuickDialogController.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
} }


@property(nonatomic, retain) QRootElement * root; @property(nonatomic, retain) QRootElement * root;
@property(nonatomic, retain) void (^willDisappearCallback)(); @property(nonatomic, copy) void (^willDisappearCallback)();


- (void)loadView; - (void)loadView;


Expand Down

0 comments on commit 2332e8b

Please sign in to comment.