Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update master

  • Loading branch information...
commit dbb3ffc0d23e5e184e62bdcb81dbb7e637cb8cc5 1 parent 6495e0b
Yuriy Bosov YuriyBosov authored

Showing 1 changed file with 6 additions and 2 deletions. Show diff stats Hide diff stats

  1. +6 2 MUKit/MUCore/MUFilter.m
8 MUKit/MUCore/MUFilter.m
@@ -38,8 +38,12 @@ - (id)initWithMaxLengthText:(NSUInteger) aMaxLengthText
38 38 //==============================================================================
39 39 - (BOOL) filterText:(id)inputTextField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
40 40 {
41   -// result &= [[inputTextField text] length] < maxLengthText;
42   - return YES;
  41 + BOOL result = YES;
  42 + if ([string length] > 0 && maxLengthText > 0)
  43 + {
  44 + result = [[inputTextField text] length] < maxLengthText;
  45 + }
  46 + return result;
43 47 }
44 48
45 49 @end

0 comments on commit dbb3ffc

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