Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

正则限制,输入中文报错 #1

Closed
klaus01 opened this issue Jun 28, 2017 · 1 comment
Closed

正则限制,输入中文报错 #1

klaus01 opened this issue Jun 28, 2017 · 1 comment

Comments

@klaus01
Copy link

klaus01 commented Jun 28, 2017

image
image

2017-06-28 16:55:36.990 InputKitDemo_OC[22341:244100] *** Terminating app due to uncaught exception 'NSRangeException', reason: '-[__NSCFString replaceOccurrencesOfString:withString:options:range:]: Range {9, 10} out of bounds; string length 10'
*** First throw call stack:
(
	0   CoreFoundation                      0x0000000108052d4b __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x0000000107ab421e objc_exception_throw + 48
	2   CoreFoundation                      0x00000001080bc2b5 +[NSException raise:format:] + 197
	3   CoreFoundation                      0x0000000107fb8e93 -[__NSCFString replaceOccurrencesOfString:withString:options:range:] + 531
	4   Foundation                          0x00000001075992a0 -[NSString stringByReplacingOccurrencesOfString:withString:options:range:] + 184
	5   InputKitDemo_OC                     0x00000001074c1da1 -[TXLimitedTextField textFieldTextDidChangeNotification:] + 1649
	6   CoreFoundation                      0x0000000107ff05ec __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
	7   CoreFoundation                      0x0000000107ff04eb _CFXRegistrationPost + 427
	8   CoreFoundation                      0x0000000107ff0252 ___CFXNotificationPost_block_invoke + 50
	9   CoreFoundation                      0x0000000107fb3282 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 2018
	10  CoreFoundation                      0x0000000107fb231b _CFXNotificationPost + 667
	11  Foundation                          0x000000010757a81b -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
	12  UIKit                               0x0000000108f976d4 -[UITextField fieldEditorDidChange:] + 257
	13  UIKit                               0x0000000108fa5a53 -[UITextInputController _sendDelegateChangeNotificationsForText:selection:] + 120
	14  UIKit                               0x0000000108f9b7a5 -[UITextField unmarkText] + 48
	15  UIKit                               0x0000000108a8aa51 -[UIResponder(UITextInput_Internal) _unmarkText] + 61
	16  UIKit                               0x000000010873f8dd -[UIKeyboardImpl unmarkText] + 43
	17  UIKit                               0x000000010873f9df -[UIKeyboardImpl unmarkText:] + 180
	18  UIKit                               0x0000000108742a6d __59-[UIKeyboardImpl handleAcceptedCandidate:executionContext:]_block_invoke_2 + 180
	19  UIKit                               0x0000000108fc736b -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 385
	20  UIKit                               0x0000000108fc7e70 -[UIKeyboardTaskQueue waitUntilTaskIsFinished:] + 261
	21  UIKit                               0x0000000108fc7fd3 -[UIKeyboardTaskQueue performSingleTask:] + 268
	22  UIKit                               0x000000010874b869 -[UIKeyboardImpl acceptCurrentCandidateForInput:] + 249
	23  UIKit                               0x0000000108b7bca2 -[UIKeyboardCandidateBar collectionView:didSelectItemAtIndexPath:] + 246
	24  UIKit                               0x0000000108daf6e4 -[UICollectionView _selectItemAtIndexPath:animated:scrollPosition:notifyDelegate:] + 702
	25  UIKit                               0x0000000108dda4d2 -[UICollectionView touchesEnded:withEvent:] + 649
	26  UIKit                               0x000000010868df6b forwardTouchMethod + 348
	27  UIKit                               0x000000010868e034 -[UIResponder touchesEnded:withEvent:] + 49
	28  UIKit                               0x000000010868df6b forwardTouchMethod + 348
	29  UIKit                               0x000000010868e034 -[UIResponder touchesEnded:withEvent:] + 49
	30  UIKit                               0x00000001084e6545 -[UIWindow _sendTouchesForEvent:] + 2747
	31  UIKit                               0x00000001084e7c33 -[UIWindow sendEvent:] + 4011
	32  UIKit                               0x00000001084949ab -[UIApplication sendEvent:] + 371
	33  UIKit                               0x0000000108c8172d __dispatchPreprocessedEventFromEventQueue + 3248
	34  UIKit                               0x0000000108c7a463 __handleEventQueue + 4879
	35  CoreFoundation                      0x0000000107ff7761 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
	36  CoreFoundation                      0x0000000107fdc98c __CFRunLoopDoSources0 + 556
	37  CoreFoundation                      0x0000000107fdbe76 __CFRunLoopRun + 918
	38  CoreFoundation                      0x0000000107fdb884 CFRunLoopRunSpecific + 420
	39  GraphicsServices                    0x000000010be44a6f GSEventRunModal + 161
	40  UIKit                               0x0000000108476c68 UIApplicationMain + 159
	41  InputKitDemo_OC                     0x00000001074c713f main + 111
	42  libdyld.dylib                       0x000000010aeb468d start + 1
	43  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
@tingxins
Copy link
Owner

已修复Bug。Objective-C 版本更新至 v1.1.1。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants