[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Apple events in toplevel loops

At  6:35 PM 6/23/93 +0100, Ralf Moeller wrote:
>The other day I wrote in info-mcl:
>>Writing an application (without a Listener) in MCL requires a new toplevel
>[... stuff deleted ...]
>>Everything works ... :-)
>>However, my simple toplevel loop does not care for apple events like |:odoc|.
>It seems to me that the original MCL 2.0 correctly processes apple events.
>The problem occurs after loading the p1 patch.
>The original MCL 2.0 application allows files to be opened by (e.g.
>double-clicking a file icon) while a file is compiled. After loading the p1 
>patch the file is shown in the editor only after the compilation has been 
>finished, i.e., MCL is idle again. 
>I would prefer the original behavior :-)

Our development version already has this change back to opening the file
immediately. Will put it in patch 3 as well. Here's the fix.

(in-package :ccl)

(defmethod open-application-document ((a application) path &optional startup)
  (declare (ignore startup))
  (let ((type (mac-file-type path)))
    (if (eq type :fasl)
      (with-simple-restart (continue "Skip loading finder-selected file.")
        (load path)
      (when (eq type :text)
       (ed path)