Skip to content

Commit

Permalink
Fixes merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Hersh authored and escoz committed Aug 16, 2013
1 parent d0a0fc4 commit aaf8985
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions quickdialog/QDecimalTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,17 @@ - (void)updateElementFromTextField:(NSString *)value {
}

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)replacement {
NSString *newValue = [_textField.text stringByReplacingCharactersInRange:range withString:replacement];
[self updateElementFromTextField:newValue];
[self updateTextFieldFromElement];
BOOL shouldChange = YES;

[_entryElement handleEditingChanged:self];

if(_entryElement && _entryElement.delegate && [_entryElement.delegate respondsToSelector:@selector(QEntryShouldChangeCharactersInRange:withString:forElement:andCell:)])
shouldChange = [_entryElement.delegate QEntryShouldChangeCharactersInRange:range withString:replacement forElement:_entryElement andCell:self];

if( shouldChange ) {
NSString *newValue = [_textField.text stringByReplacingCharactersInRange:range withString:replacement];
[self updateElementFromTextField:newValue];
[self updateTextFieldFromElement];
[_entryElement handleEditingChanged:self];
}
return NO;
}

Expand Down
2 changes: 1 addition & 1 deletion quickdialog/QuickDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#import "QBadgeElement.h"
#import "QBooleanElement.h"
#import "QButtonElement.h"
#import "QuickDialogEntryElementDelegate.h"
#import "QEntryElement.h"
#import "QEntryTableViewCell.h"
#import "QDateTimeInlineElement.h"
Expand All @@ -60,7 +61,6 @@
#import "QColorPickerElement.h"
#import "UIColor+ColorUtilities.h"
#import "QProgressElement.h"
#import "QuickDialogEntryElementDelegate.h"
#import "QuickDialogController+Loading.h"
#import "QAutoEntryElement.h"
#import "QAutoEntryTableViewCell.h"
Expand Down

0 comments on commit aaf8985

Please sign in to comment.