Skip to content

Commit

Permalink
Merge pull request escoz#300 from snod/master
Browse files Browse the repository at this point in the history
adds the onValueChanged block calls to QMultilineElement and QEntryElement
  • Loading branch information
escoz committed Oct 23, 2012
2 parents 51e434a + 7805114 commit 1875cb0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions quickdialog/QEntryTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ - (void)textFieldEditingChanged:(UITextField *)textFieldEditingChanged {
if(_entryElement && _entryElement.delegate && [_entryElement.delegate respondsToSelector:@selector(QEntryEditingChangedForElement:andCell:)]){
[_entryElement.delegate QEntryEditingChangedForElement:_entryElement andCell:self];
}

if(_entryElement.onValueChanged) {
_entryElement.onValueChanged();
}
}

- (void)textFieldDidBeginEditing:(UITextField *)textField {
Expand Down
12 changes: 8 additions & 4 deletions quickdialog/QMultilineTextViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,14 @@ - (void)textViewDidBeginEditing:(UITextView *)textView {

- (void)textViewDidEndEditing:(UITextView *)textView {
_entryElement.textValue = textView.text;

if(_entryElement && _entryElement.delegate && [_entryElement.delegate respondsToSelector:@selector(QEntryDidEndEditingElement:andCell:)]){
[_entryElement.delegate QEntryDidEndEditingElement:_entryElement andCell:self.entryCell];
}

if(_entryElement && _entryElement.delegate && [_entryElement.delegate respondsToSelector:@selector(QEntryDidEndEditingElement:andCell:)]){
[_entryElement.delegate QEntryDidEndEditingElement:_entryElement andCell:self.entryCell];
}

if (_entryElement.onValueChanged) {
_entryElement.onValueChanged();
}
}

- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text {
Expand Down

0 comments on commit 1875cb0

Please sign in to comment.