Skip to content
Browse files

Update master

  • Loading branch information...
1 parent 6495e0b commit dbb3ffc0d23e5e184e62bdcb81dbb7e637cb8cc5 @YuriyBosov YuriyBosov committed Jun 4, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 MUKit/MUCore/MUFilter.m
View
8 MUKit/MUCore/MUFilter.m
@@ -38,8 +38,12 @@ - (id)initWithMaxLengthText:(NSUInteger) aMaxLengthText
//==============================================================================
- (BOOL) filterText:(id)inputTextField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
-// result &= [[inputTextField text] length] < maxLengthText;
- return YES;
+ BOOL result = YES;
+ if ([string length] > 0 && maxLengthText > 0)
+ {
+ result = [[inputTextField text] length] < maxLengthText;
+ }
+ return result;
}
@end

0 comments on commit dbb3ffc

Please sign in to comment.
Something went wrong with that request. Please try again.