Important: The information in this document is obsolete and should not be used for new development.
User Interaction
When your application supports Apple events, it may act as a server, providing services to a client application or script. The client has the option of setting the interaction level, and it may specify that no user interface items should be displayed. If your application wishes to interact with the user while processing an Apple event, it should call theTApplication
methodInteractWithUser
. This method determines whether user interaction is allowed, based on information obtained from the Apple Event Manager, and returns an appropriateOSErr
value:
Your application can call
- NoErr. Interaction is allowed and the application is in the foreground. If interaction is allowed and the application isn't in the foreground,
InteractWithUser
uses the Notification Manager to bring the application to the front.- Any other error value. Either interaction is not allowed or the application is not in the foreground (and could not be brought to the foreground).
InteractWithUser
, then callFailOSErr
, passing the returned value. Any error will be handled as described in the following section.