On Dec 15, 2008, at 5:14 AM, Philip Aker wrote:
Like I said before, I'm not sure because the AppleScript component is involved and my components both delegate and override events.
Are you using the CaptureComponent() API to override other scripting components?
As an AppleScript user, my opinion about the general case is that I agree with the other folks who think it's _not_ a good plan to whack modal capability. Modal dialogs are a fundamental UI requirement (i.e. password before proceeding). Just a wild guess, but if you're in a pinch for a modal box which might serve in a chain of asynchronous facilities in a larger context which doesn't want to be disturbed, I'm wondering if CFUserNotificationDisplayAlert() and CFUserNotificationDisplayNotice() would be viable alternatives.
To be clear, when a script issues the ‘display dialog’ command, the script pauses until the dialog is dismissed and the command is completed. Similarly, the application running the script usually pauses, too. Most applications don't respond to user input while waiting on an Apple Event to reply.
The defining feature of a modal dialog is that it prevents user interaction with the rest of the application that is displaying the dialog. What we're discussing is whether it's important to prevent user interaction with another application, in addition to the one running the script.
If you open Script Editor and run:
tell application "Finder" to display alert "Hi!"
Script Editor will be unresponsive to user input while the script waits for the Apple Event reply from Finder. In addition, since Finder is displaying a modal dialog, the user cannot interact with Finder windows or the Desktop. Similarly, if you put that script into a script applet, the applet will not respond to user input while the script is waiting on the reply from Finder.
Is it important to prevent user interaction with applications in addition to the one running the script?
Goal: implement an arbitrary language (not AppleScript) in an OSA component such that:
So, you're implementing a Component Manager scripting component? You're not just calling APIs in OSA.h to use a scripting component?
I think I could say on behalf of folks making components that we'd really appreciate it if you or another member of the AppleScript team could look into OSA issues and consider modernization.
We're aware of the desire for a modern replacement for OSA in general. Please do file enhancement requests with information about what you'd like to see in a replacement.