Lisp Knowledgebase

Title: capi:editor-pane operations malfunctioning on Cocoa

ID: 17033


Product: LispWorks for Macintosh
Version: All
OS: Mac OS X

Description:

Editor commands and functions may not always work correctly in your interfaces on Cocoa when called in code which works correctly on other platforms. Failure to scroll or failure to update the cursor position are instances of this problem.

The issue is that editor operations need to run in their own thread in LispWorks on Mac OS X, not in the thread of the CAPI window.

The way to initiate this is using the function editor:process-character which can be passed a list containing a function and its arguments. For example:

(defun set-buffer-file (ed path)
 (let* ((pane (edit-pane ed))
        (buff (capi:editor-pane-buffer pane))
        (window (capi:editor-window pane)))
   (editor:process-character
    `(editor:find-alternate-file-command nil ,path ,buff)
    window)))


Such code is portable to other platforms.

Note that you should not perform CAPI operations using editor:process-character, only editor operations.

See Also:
Workaround:
Patch:

Hardware:N/A
Summary:
Bug#:
Patch Enhancement#:
Reported:

Company     Contact     Privacy Policy     Terms of Use