• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Custom view and NSText
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom view and NSText


  • Subject: Custom view and NSText
  • From: Georg Seifert <email@hidden>
  • Date: Wed, 11 Dec 2013 15:21:14 +0100

Hi,

I have an view that acts as an text view by implementing the NSTextInputClient protocol. This works fine in 10.8 but leads to crashes in 10.9. The report says:

> Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'All NSText methods must be implemented by subclassers.  They should not call super.'

It seems to be related to the new input methods in 10.9. Like if you hold a key it will show a small popover that gives you some variants of that character (like accented characters) similar to the iOD keyboard. I tried to find any documentation about this...

The problem goes away if I link to the 10.9 SDK but I can't do that as I still support 10.6 and need to build on a 10.7 machine.

So can anyone point me in the right direction on how to implement the popovers?

below is a backtrace.

Thanks
Georg

Last Exception Backtrace:
0   CoreFoundation                      0x7fff89467404 ___exceptionPreprocess + 148
1   libobjc.A.dylib                     0x7fff921a0e75 _objc_exception_throw + 43
2   CoreFoundation                      0x7fff894672cc +[NSException raise:format:] + 204
3   AppKit                              0x7fff8c41c1ff -[NSText string] + 43
4   AppKit                              0x7fff8bfb786c -[NSTextInputContext handleTSMEvent:] + 3555
5   AppKit                              0x7fff8bfb6a65 __NSTSMEventHandler + 205
6   HIToolbox                           0x7fff8cf5f6d4 __ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 892
7   HIToolbox                           0x7fff8cf5ec87 __ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 385
8   HIToolbox                           0x7fff8cf72d90 _SendEventToEventTarget + 40
9   HIToolbox                           0x7fff8cfb40ed _SendTSMEvent + 33
10  HIToolbox                           0x7fff8d16171f _SendTextInputEvent + 1028
11  HIToolbox                           0x7fff8d1ac8ec -[IMKInputSession _copyUniCharsForRange:intoBuffer:ofLength:] + 268
12  HIToolbox                           0x7fff8d1ac9bb -[IMKInputSession _coreAttributesFromRange:whichAttributes:actualRange:] + 137
13  HIToolbox                           0x7fff8d1adaac -[IMKInputSession attributedSubstringFromRange:] + 89
14  CoreFoundation                      0x7fff89352dec ___invoking___ + 140
15  CoreFoundation                      0x7fff89352c54 -[NSInvocation invoke] + 308
16  CoreFoundation                      0x7fff893f57a6 -[NSInvocation invokeWithTarget:] + 54
17  CoreFoundation                      0x7fff893c5384 ____forwarding___ + 452
18  CoreFoundation                      0x7fff893c5138 __CF_forwarding_prep_0 + 120
19  CoreFoundation                      0x7fff89352dec ___invoking___ + 140
20  CoreFoundation                      0x7fff89352c54 -[NSInvocation invoke] + 308
21  Foundation                          0x7fff90130c67 -[NSConnection dispatchInvocation:] + 135
22  Foundation                          0x7fff9013092d -[NSConnection handleRequest:sequence:] + 1434
23  Foundation                          0x7fff900d7cf0 -[NSConnection handlePortCoder:] + 652
24  Foundation                          0x7fff900d7628 -[NSConnection dispatchWithComponents:] + 50
25  Foundation                          0x7fff900bbed8 ___NSFireMachPort + 257
26  CoreFoundation                      0x7fff89398d04 ___CFMachPortPerform + 388
27  CoreFoundation                      0x7fff89398b69 ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
28  CoreFoundation                      0x7fff89398ade ___CFRunLoopDoSource1 + 478
29  CoreFoundation                      0x7fff89389bd6 ___CFRunLoopRun + 1830
30  CoreFoundation                      0x7fff89389275 _CFRunLoopRunSpecific + 309
31  Foundation                          0x7fff900d400e -[NSConnection sendInvocation:internal:] + 1965
32  CoreFoundation                      0x7fff893c5384 ____forwarding___ + 452
33  CoreFoundation                      0x7fff893c5138 __CF_forwarding_prep_0 + 120
34  HIToolbox                           0x7fff8d1a8b8d -[IMKInputSession handleEvent:] + 946
35  HIToolbox                           0x7fff8d16c2e8 _IMKInputSessionProcessEventRef + 45
36  HIToolbox                           0x7fff8d16b8aa _InputMethodInstanceProcessEventRef + 100
37  HIToolbox                           0x7fff8d160e6f _TSMEventToInputMethod + 131
38  HIToolbox                           0x7fff8cfa0452 _TSMProcessRawKeyEvent + 3034
39  AppKit                              0x7fff8bfb62b0 -[NSTextInputContext handleEvent:] + 731
40  AppKit                              0x7fff8bf95b5d -[NSView interpretKeyEvents:] + 180
...
...
...


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Prev by Date: Re: Threaded drawing
  • Next by Date: Re: Threaded drawing
  • Previous by thread: Re: NSButton state not persisting
  • Next by thread: Strange Static Analyzer Warning
  • Index(es):
    • Date
    • Thread