liutanyu / mcl

Automatically exported from code.google.com/p/mcl
Other
0 stars 0 forks source link

AppleEvent error for each keystroke #34

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
To reproduce, evaluate:

(trace error)

For each character subsequently typed into the listener, trace will report:

Calling (ERROR #<APPLEEVENT-ERROR #x34F1B56>) 

A backtrace reveals that the event has the class :|tsvc| and the id :|unim| 
(#$kTextService #$kUnicodeNotFromInputMethod).

Original issue reported on code.google.com by terje.norderhaug on 22 Mar 2010 at 8:42

GoogleCodeExporter commented 8 years ago
Adding a NIL event handler eliminates the appleevent error:

(install-appleevent-handler #$kTextService #$kUnicodeNotFromInputMethod NIL)

However, this introduces a new condition revealed by evaluating (trace signal) 
and type any key:

Calling (SIGNAL #<CCL::UNDEFINED-FUNCTION-CALL #x351626E>)

Using a proper noop event handler is no fix - afterwards evaluating this keys 
will no longer be handled:

(install-appleevent-handler #$kTextService #$kUnicodeNotFromInputMethod
                            (lambda (app event reply refcon)
                              (declare (ignore app event reply refcon))))

A

Original comment by terje.norderhaug on 22 Mar 2010 at 9:16