[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MCL 2.0.1 & High-Level Events
- To: D3429@AppleLink.Apple.COM (Image Engineering, J Morris,PRT)
- Subject: Re: MCL 2.0.1 & High-Level Events
- From: bill@cambridge.apple.com (Bill St. Clair)
- Date: Tue, 21 Jun 1994 11:12:33 -0400
- Cc: info-mcl
At 2:41 PM 6/21/94 +0000, Image Engineering, J Morris,PRT wrote:
>Bill,
>
>I am trying to write methods for the standard apple event handlers:
>quit-application-handler and open-documents-handler. These methods work
>properly while I am in MCL but not after I do save-application. As a test
>I tried to put versions of these methods into the sample "binhex"
>application on the CD. It still did not work. Further investigation
>showed that the saved "binhex" was not even receiving high-level events.
>I determined this by adding a simple test to *eventhook* which looks
>at *current-event*. The same simple test was successful from within MCL.
>I used ResEdit to check the SIZE resource and confirmed that the "high-level
>event aware" flag was set in all three SIZE resources (IDs -1, 0, 1).
>
>The question is: how can I get "binhex" to recognize high-level- (and thus
>Apple-) events?
It is likely that your toplevel-function neglected to call
(startup-finished), a new "feature" of MCL 2.0.1 that is documented
in the release notes. This feature makes it possible to print
from the Finder when printing requires launching the MCL app.
Here is the relevant section of the release notes:
-----------------------------------------------------------------------------
New startup housekeeping
------------------------
In order to make printing from the Finder work correctly, high level
events are disabled until MCL's startup code enables them. If you call
SAVE-APPLICATION and specify a value for the :TOPLEVEL-FUNCTION parameter,
your toplevel function must evaluate the following form (either directly,
or indirectly via a call to CCL::STARTUP-CCL):
(startup-finished)
You should do this after processing the (FINDER-PARAMETERS). If you neglect
the call to STARTUP-FINISHED, your application will not receive any high
level events (e.g. AppleEvents).